diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-09 15:00:29 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-09 15:00:29 +0800 |
commit | 9f621b6076181e577748dda3966bbc526586445d (patch) | |
tree | 05057166585d0f229030c44718312432ab163dc7 /script-beta/vm/getGlobals.lua | |
parent | 1e3726e3d3f6c84ce29e857181261b5ffb2d0da3 (diff) | |
download | lua-language-server-9f621b6076181e577748dda3966bbc526586445d.zip |
支持看lib的table
Diffstat (limited to 'script-beta/vm/getGlobals.lua')
-rw-r--r-- | script-beta/vm/getGlobals.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/vm/getGlobals.lua b/script-beta/vm/getGlobals.lua index 699dd270..116bf8d5 100644 --- a/script-beta/vm/getGlobals.lua +++ b/script-beta/vm/getGlobals.lua @@ -3,6 +3,9 @@ local vm = require 'vm.vm' local function getGlobals(root) local env = guide.getENV(root) + if not env then + return nil + end local cache = {} local mark = {} vm.eachField(env, function (info) |