Skip to content

Commit

Permalink
fix(player): 从 cache 拿东西之前先判断有没有, close #270
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9804 committed Oct 29, 2024
1 parent 6fd1f89 commit 12c8279
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ba-story-player/lib/stores/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ const getterFunctions: GetterFunctions = {
},

l2dSpineData() {
const resource = Assets.get(privateState.l2dSpineUrl);
if (resource) return resource.spineData;
return Assets.cache.has(privateState.l2dSpineUrl)
? Assets.get(privateState.l2dSpineUrl)?.spineData
: null;
},
};

Expand Down

0 comments on commit 12c8279

Please sign in to comment.