summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-05 19:13:53 +0800
committersumneko <sumneko@hotmail.com>2019-05-05 19:13:53 +0800
commit2012cba6d31f1fcba0dc27a5454ecc1da3034032 (patch)
treeac10ce88999cf76fa978f6a0d5a368e1c36ec316 /server
parent43ba531f175af9eeb4791e4f0a14562cc452583a (diff)
downloadlua-language-server-2012cba6d31f1fcba0dc27a5454ecc1da3034032.zip
判空
Diffstat (limited to 'server')
-rw-r--r--server/src/core/completion.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua
index c8147f9e..0c3a0c71 100644
--- a/server/src/core/completion.lua
+++ b/server/src/core/completion.lua
@@ -552,7 +552,7 @@ local function searchCallArg(vm, source, word, callback, pos)
if enum.name == name and enum.enum then
if matchKey(word, enum.enum) then
local label, textEdit
- if source.type ~= arg.type then
+ if source.type ~= (arg and arg.type) then
label = ('%q'):format(enum.enum)
end
if source.type ~= 'call' then