From 52f3c9291ba46d68ab98ad19b2d6d4070fa18af6 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Wed, 11 Sep 2024 11:13:40 +0630 Subject: [PATCH] Fix cache auto-clearing on MV3 Fixed #48 --- source/legacy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/legacy.ts b/source/legacy.ts index 734dec9..ce8dbdb 100644 --- a/source/legacy.ts +++ b/source/legacy.ts @@ -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}; @@ -134,7 +134,7 @@ function init(): void { } // Automatically clear cache every day - if (!isBackgroundPage()) { + if (!isBackground()) { return; }