summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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