summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script-beta/vm/eachRef.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script-beta/vm/eachRef.lua b/script-beta/vm/eachRef.lua
index cc004c20..b636451b 100644
--- a/script-beta/vm/eachRef.lua
+++ b/script-beta/vm/eachRef.lua
@@ -309,7 +309,7 @@ local function ofGlobal(source, callback)
for _, uri in ipairs(uris) do
local ast = files.getAst(uri)
local globals = vm.getGlobals(ast.ast)
- if globals[key] then
+ if globals and globals[key] then
for _, info in ipairs(globals[key]) do
callback(info)
if info.value then