summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--script/core/noder.lua8
2 files changed, 6 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md
index 343422e9..7eafe189 100644
--- a/changelog.md
+++ b/changelog.md
@@ -6,6 +6,7 @@
* `FIX` `debug.getuservalue` and `debug.setuservalue` should not exist in `Lua 5.1`
* `FIX` infer of `---@type class[][]`
* `FIX` infer of `---@type {}[]`
+* `FIX` [#597](https://github.com/sumneko/lua-language-server/issues/597)
## 2.2.3
`2021-7-9`
diff --git a/script/core/noder.lua b/script/core/noder.lua
index 28a547bb..566a7445 100644
--- a/script/core/noder.lua
+++ b/script/core/noder.lua
@@ -1009,9 +1009,11 @@ function m.compileNode(noders, source)
end
end
if doc.type == 'doc.vararg' then
- for _, param in ipairs(source.args) do
- if param.type == '...' then
- pushForward(noders, getID(param), getID(doc))
+ if source.args then
+ for _, param in ipairs(source.args) do
+ if param.type == '...' then
+ pushForward(noders, getID(param), getID(doc))
+ end
end
end
end