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 ef61d10 commit 595a5a6
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 595a5a6

Please sign in to comment.