diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-20 21:26:08 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-20 21:26:08 +0800 |
commit | dc1d7f569a80ccdcd3daef3fa69acaaf0910e0f9 (patch) | |
tree | 401406a4d162198ab0289b00341b1429857b536a /server/src/matcher/vm.lua | |
parent | c38b64f0c5cba3e75d1ba7e43c3f042410dc5058 (diff) | |
download | lua-language-server-dc1d7f569a80ccdcd3daef3fa69acaaf0910e0f9.zip |
判一下空
Diffstat (limited to 'server/src/matcher/vm.lua')
-rw-r--r-- | server/src/matcher/vm.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua index f2494432..b04089af 100644 --- a/server/src/matcher/vm.lua +++ b/server/src/matcher/vm.lua @@ -1097,7 +1097,9 @@ function mt:doFunction(action) end end local func = self:buildFunction(action, object) - self:setValue(var, func, source) + if var then + self:setValue(var, func, source) + end end function mt:doLocalFunction(action) @@ -1114,7 +1116,9 @@ function mt:doLocalFunction(action) end end local func = self:buildFunction(action, object) - self:setValue(var, func, source) + if var then + self:setValue(var, func, source) + end end function mt:doAction(action) |