diff --git a/cocos/spine/skeleton-cache.ts b/cocos/spine/skeleton-cache.ts index 8798c425236..a02690b3892 100644 --- a/cocos/spine/skeleton-cache.ts +++ b/cocos/spine/skeleton-cache.ts @@ -467,7 +467,7 @@ class SkeletonCache { delete animationPool[key]; } } - let skeletonInfo = this._skeletonCache[uuid]; + const skeletonInfo = this._skeletonCache[uuid]; const skeleton = skeletonInfo && skeletonInfo.skeleton; if (skeleton) { spine.wasmUtil.destroySpineSkeleton(skeleton); diff --git a/cocos/spine/skeleton-data.ts b/cocos/spine/skeleton-data.ts index 31fb6d395f5..18b8acb5951 100644 --- a/cocos/spine/skeleton-data.ts +++ b/cocos/spine/skeleton-data.ts @@ -230,8 +230,7 @@ export class SkeletonData extends Asset { this._skeletonCache = spine.wasmUtil.createSpineSkeletonDataWithBinary(byteSize, this._atlasText, this.textureNames, textureUUIDs); spine.wasmUtil.registerSpineSkeletonDataWithUUID(this._skeletonCache, uuid); } - } - + } return this._skeletonCache; }