summaryrefslogtreecommitdiff
path: root/server/src/matcher
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-19 14:24:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-19 14:24:09 +0800
commit16019a66f988f24fa0dd195cea4497d1b08acdc8 (patch)
tree158991e76a82e6a9d4ed2dd1ba7dac30fabc3f89 /server/src/matcher
parentba49cf4de25ab089b5c5d9cf9652decdc5d6a400 (diff)
downloadlua-language-server-16019a66f988f24fa0dd195cea4497d1b08acdc8.zip
判空
Diffstat (limited to 'server/src/matcher')
-rw-r--r--server/src/matcher/completion.lua2
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