summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/duplicate-set-field.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/diagnostics/duplicate-set-field.lua')
-rw-r--r--script/core/diagnostics/duplicate-set-field.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/script/core/diagnostics/duplicate-set-field.lua b/script/core/diagnostics/duplicate-set-field.lua
index 8052c420..f5007eb1 100644
--- a/script/core/diagnostics/duplicate-set-field.lua
+++ b/script/core/diagnostics/duplicate-set-field.lua
@@ -48,10 +48,12 @@ return function (uri, callback)
local blocks = {}
for _, value in ipairs(values) do
local block = guide.getBlock(value)
- if not blocks[block] then
- blocks[block] = {}
+ if block then
+ if not blocks[block] then
+ blocks[block] = {}
+ end
+ blocks[block][#blocks[block]+1] = value
end
- blocks[block][#blocks[block]+1] = value
end
for _, defs in pairs(blocks) do
if #defs <= 1 then