summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/unknown-cast-variable.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/diagnostics/unknown-cast-variable.lua')
-rw-r--r--script/core/diagnostics/unknown-cast-variable.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/diagnostics/unknown-cast-variable.lua b/script/core/diagnostics/unknown-cast-variable.lua
index cfa25ed8..57377f6e 100644
--- a/script/core/diagnostics/unknown-cast-variable.lua
+++ b/script/core/diagnostics/unknown-cast-variable.lua
@@ -16,7 +16,7 @@ return function (uri, callback)
end
for _, doc in ipairs(state.ast.docs) do
- if doc.type == 'doc.cast' then
+ if doc.type == 'doc.cast' and doc.loc then
await.delay()
local defs = vm.getDefs(doc.loc)
local loc = defs[1]