From 081c6ff280d6703493933ee860975f8785e11aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 14 Jun 2023 15:54:39 +0800 Subject: check nil --- script/core/diagnostics/missing-local-export-doc.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'script/core') 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 -- cgit v1.2.3