diff --git a/src/storage.ts b/src/storage.ts index c8fe5ce6..2fdadbca 100644 --- a/src/storage.ts +++ b/src/storage.ts @@ -295,7 +295,7 @@ function createStorage(): WxtStorage { { migratedValue }, ); }; - browser.runtime.onInstalled.addListener(async ({ reason }) => { + browser.runtime.onInstalled?.addListener(async ({ reason }) => { if (reason !== 'update') return; try { await migrate();