From b7883f18ba9b444453f3ee33c5eee19fa2248ad5 Mon Sep 17 00:00:00 2001 From: zxx43 Date: Fri, 14 Aug 2026 16:41:08 +0800 Subject: [PATCH] fix boneIdx check error (#264) * fix boneIdx check error * simplify check --- cocos/spine/skeleton.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index abca73ea1d..2672245c59 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -1589,7 +1589,7 @@ export class Skeleton extends UIRenderer { const socket = this._sockets[i]; if (socket.path && socket.target) { const boneIdx = this._cachedSockets.get(socket.path); - if (!boneIdx) { + if (boneIdx == null || boneIdx < 0) { error(`Skeleton data does not contain path ${socket.path}`); continue; }