diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-08 19:21:26 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-08 19:21:26 +0800 |
commit | d52bd13cb560abf9711412b759212f8845970139 (patch) | |
tree | 3b1d82dbcddc70c793fc60537701b7dc10747942 /server/src/matcher/compile.lua | |
parent | 2a8a23aec9cceec42f288750b3ed19ec8bd23fc7 (diff) | |
download | lua-language-server-d52bd13cb560abf9711412b759212f8845970139.zip |
修正一个崩溃
Diffstat (limited to 'server/src/matcher/compile.lua')
-rw-r--r-- | server/src/matcher/compile.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/matcher/compile.lua b/server/src/matcher/compile.lua index 7b29f188..b9bd4b6d 100644 --- a/server/src/matcher/compile.lua +++ b/server/src/matcher/compile.lua @@ -8,7 +8,7 @@ function mt:getVar(key, source) end local var = self.env.var[key] or self:getField(self.env.var._ENV, key, source) -- 这里不需要用getVar来递归获取_ENV - if not var then + if not var and source then var = self:addField(self:getVar '_ENV', key, source) end if var and var.meta then |