diff options
Diffstat (limited to 'script-beta/vm/getGlobals.lua')
-rw-r--r-- | script-beta/vm/getGlobals.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/script-beta/vm/getGlobals.lua b/script-beta/vm/getGlobals.lua index adc6c9fc..53fff173 100644 --- a/script-beta/vm/getGlobals.lua +++ b/script-beta/vm/getGlobals.lua @@ -12,10 +12,12 @@ local function getGlobalsOfFile(uri) local results = guide.requestFields(env) for _, res in ipairs(results) do local name = guide.getSimpleName(res) - if not globals[name] then - globals[name] = {} + if name then + if not globals[name] then + globals[name] = {} + end + globals[name][#globals[name]+1] = res end - globals[name][#globals[name]+1] = res end return globals end |