fix boneIdx check error (#264)

* fix boneIdx check error

* simplify check
This commit is contained in:
zxx43
2026-08-14 16:41:08 +08:00
committed by GitHub
parent 3ab299035a
commit b7883f18ba
+1 -1
View File
@@ -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;
}