summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-06-14 15:54:39 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-06-14 15:54:39 +0800
commit081c6ff280d6703493933ee860975f8785e11aff (patch)
treefaa5c4957242e021db7932a37dc8b8c481d94c0b /script/core
parentd95fe20a07d599994323a766c6f78e4867ddcace (diff)
downloadlua-language-server-081c6ff280d6703493933ee860975f8785e11aff.zip
check nil
Diffstat (limited to 'script/core')
-rw-r--r--script/core/diagnostics/missing-local-export-doc.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/diagnostics/missing-local-export-doc.lua b/script/core/diagnostics/missing-local-export-doc.lua
index f12e954f..da413961 100644
--- a/script/core/diagnostics/missing-local-export-doc.lua
+++ b/script/core/diagnostics/missing-local-export-doc.lua
@@ -14,6 +14,9 @@ local function findSetField(ast, name, callback)
return
end
local func = funcPtr.value
+ if not func then
+ return
+ end
if funcPtr.type == 'local' and func.type == 'function' then
helper.CheckFunction(func, callback, 'DIAG_MISSING_LOCAL_EXPORT_DOC_COMMENT', 'DIAG_MISSING_LOCAL_EXPORT_DOC_PARAM', 'DIAG_MISSING_LOCAL_EXPORT_DOC_RETURN')
end