Skip to content

Commit

Permalink
fix Type 'AnimationCache | null' is not assignable to type 'Animation…
Browse files Browse the repository at this point in the history
…Cache'.
  • Loading branch information
Canvasfull committed Jul 13, 2023
1 parent 5271644 commit 893aa66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cocos/spine/skeleton-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,13 @@ class SkeletonCache {
return skeletonInfo;
}

public getAnimationCache (uuid: string, animationName: string) {
public getAnimationCache (uuid: string, animationName: string): null | AnimationCache {
const poolKey = `${uuid}#${animationName}`;
const animCache = this._animationPool[poolKey];
return animCache;
}

public initAnimationCache (uuid: string, data: SkeletonData, animationName: string) {
public initAnimationCache (uuid: string, data: SkeletonData, animationName: string): null | AnimationCache {
const spData = data.getRuntimeData();
if (!spData) return null;
const skeletonInfo = this._skeletonCache[uuid];
Expand Down

0 comments on commit 893aa66

Please sign in to comment.