summaryrefslogtreecommitdiff
path: root/script/core/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-08 03:39:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-08 03:39:06 +0800
commit4035722624ac91b7dbd5e6a92837de238f077bc9 (patch)
tree3a55a1de73b571f563ace50a0edc3aee3d8eddbc /script/core/diagnostics
parentf1a0d7caf5106798fe9c79c55ba3e92576d8682c (diff)
downloadlua-language-server-4035722624ac91b7dbd5e6a92837de238f077bc9.zip
update
Diffstat (limited to 'script/core/diagnostics')
-rw-r--r--script/core/diagnostics/duplicate-doc-field.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/diagnostics/duplicate-doc-field.lua b/script/core/diagnostics/duplicate-doc-field.lua
index 4bed984c..8d355aac 100644
--- a/script/core/diagnostics/duplicate-doc-field.lua
+++ b/script/core/diagnostics/duplicate-doc-field.lua
@@ -15,7 +15,8 @@ local function getFieldEventName(doc)
end
for i = 1, 2 do
local arg = docFunc.args[i]
- if arg
+ if arg
+ and arg.extends
and #arg.extends.types == 1 then
local literal = arg.extends.types[1]
if literal.type == 'doc.type.boolean'