summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-25 17:38:05 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-25 17:38:05 +0800
commitf74154aac067a7c9e2e4f302d69be4193a960b04 (patch)
tree0f1112d3bf1cd0ff7cd6e59f681cbbfa4bbc49d4
parent024414366e1dbdfa804d0f71fac53c0246490b4b (diff)
downloadlua-language-server-f74154aac067a7c9e2e4f302d69be4193a960b04.zip
修正报错
-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 d5067ed2..83f51044 100644
--- a/server/src/matcher/completion.lua
+++ b/server/src/matcher/completion.lua
@@ -263,7 +263,7 @@ local function findClosePos(vm, pos)
end
end
end
- if parent.type ~= 'local' and parent.type ~= 'field' then
+ if parent and parent.type ~= 'local' and parent.type ~= 'field' then
parent = nil
end
if parent then