summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-23 19:55:00 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-23 19:55:00 +0800
commit811a2f24aba428bad5e9e0d30860202e780ec0d2 (patch)
treec2ed20c598a70f07cb90e15718292e78c98d0674 /script/core
parent01b87570e6d8f2655ebc0e5a33258735b857f228 (diff)
downloadlua-language-server-811a2f24aba428bad5e9e0d30860202e780ec0d2.zip
checks function only
Diffstat (limited to 'script/core')
-rw-r--r--script/core/diagnostics/duplicate-set-field.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/script/core/diagnostics/duplicate-set-field.lua b/script/core/diagnostics/duplicate-set-field.lua
index 7c857a51..83b7f21a 100644
--- a/script/core/diagnostics/duplicate-set-field.lua
+++ b/script/core/diagnostics/duplicate-set-field.lua
@@ -31,11 +31,8 @@ return function (uri, callback)
goto CONTINUE
end
local value = guide.getObjectValue(nxt)
- if value then
- if value.type == 'boolean'
- or value.type == 'nil' then
- goto CONTINUE
- end
+ if not value or value.type ~= 'function' then
+ goto CONTINUE
end
if not sets[name] then
sets[name] = {}