From ed146736bd349b1b9cd19279e3c88ece39cec788 Mon Sep 17 00:00:00 2001 From: xu_yanfeng Date: Wed, 19 Feb 2025 15:20:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A82.x=E6=A3=80?= =?UTF-8?q?=E6=B5=8Bbutton=E5=9B=9E=E8=B0=83=E5=BC=82=E5=B8=B8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/inject/code-hint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/inject/code-hint.ts b/src/scripts/inject/code-hint.ts index f745cd2..79417fb 100644 --- a/src/scripts/inject/code-hint.ts +++ b/src/scripts/inject/code-hint.ts @@ -27,7 +27,7 @@ function getButton(node: any, fillFn: boolean): FunctionInfo[] { const ret: FunctionInfo[] = []; for (let i = 0; i < arr.length; i++) { const item = arr[i]; - if (!item.target) { + if (!item || !item.target) { continue; } const compType = cc.js._getClassById(item._componentId);