Skip to content

Commit

Permalink
Fix cache auto-clearing on MV3
Browse files Browse the repository at this point in the history
Fixed #48
  • Loading branch information
fregante authored Sep 11, 2024
1 parent 385fd37 commit 52f3c92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/legacy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chromeP from 'webext-polyfill-kinda';
import {isBackgroundPage, isExtensionContext} from 'webext-detect';
import {isBackground, isExtensionContext} from 'webext-detect';
import toMilliseconds, {type TimeDescriptor} from '@sindresorhus/to-milliseconds';

const cacheDefault = {days: 30};
Expand Down Expand Up @@ -134,7 +134,7 @@ function init(): void {
}

// Automatically clear cache every day
if (!isBackgroundPage()) {
if (!isBackground()) {
return;
}

Expand Down

0 comments on commit 52f3c92

Please sign in to comment.