Skip to content

Commit

Permalink
✨ feat: CacheManager support delete method
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Jun 3, 2023
1 parent 9f27b16 commit b3b74e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/CacheManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export class CacheManager {
this._cacheList.push(cache);
}

private hasCache(cache: EmotionCache) {
delete(cache: EmotionCache) {
this._cacheList = this._cacheList.filter((c) => c.key !== cache.key);
}

hasCache(cache: EmotionCache) {
return this._cacheList.some((c) => c.key === cache.key);
}

Expand Down

0 comments on commit b3b74e9

Please sign in to comment.