summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-24 15:35:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-24 15:35:25 +0800
commit622bb5db85d7ed453295f1c4df463532075a695b (patch)
tree1dbefb8a183dd0cbe988c2988e7081fd870bb365 /server
parent83b82470f1486493e5373501f1f69d8ca0b6e18f (diff)
downloadlua-language-server-622bb5db85d7ed453295f1c4df463532075a695b.zip
判空
Diffstat (limited to 'server')
-rw-r--r--server/src/matcher/vm.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua
index d80aaba2..1aaffac4 100644
--- a/server/src/matcher/vm.lua
+++ b/server/src/matcher/vm.lua
@@ -809,6 +809,9 @@ function mt:unpackList(list, expect)
local res = {
type = 'list',
}
+ if not list then
+ return res
+ end
if list.type == 'list' or list.type == 'call' then
for i, exp in ipairs(list) do
if exp.type == '...' then