diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-19 14:24:09 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-19 14:24:09 +0800 |
commit | 16019a66f988f24fa0dd195cea4497d1b08acdc8 (patch) | |
tree | 158991e76a82e6a9d4ed2dd1ba7dac30fabc3f89 | |
parent | ba49cf4de25ab089b5c5d9cf9652decdc5d6a400 (diff) | |
download | lua-language-server-16019a66f988f24fa0dd195cea4497d1b08acdc8.zip |
判空
-rw-r--r-- | server/src/matcher/completion.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/matcher/completion.lua b/server/src/matcher/completion.lua index 5d9c99f0..95b3c0e2 100644 --- a/server/src/matcher/completion.lua +++ b/server/src/matcher/completion.lua @@ -175,7 +175,7 @@ return function (vm, pos) } end) elseif result.type == 'field' then - if result.parent.value and result.parent.value.ENV == true then + if result.parent and result.parent.value and result.parent.value.ENV == true then -- 全局变量也搜索是不是local searchLocals(vm, pos, result.key, function (loc) if mark[loc.key] then |