Skip to content

Commit 0203ccd

Browse files
committed
hacky solution
* this needs to be tidied up
1 parent 2ce1fd4 commit 0203ccd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/storage/src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,6 @@ function createStorage(): WxtStorage {
441441

442442
const newValue = await opts.init();
443443
await driver.setItem<any>(driverKey, newValue);
444-
await setMeta(driver, driverKey, { v: targetVersion });
445444
return newValue;
446445
});
447446

@@ -470,6 +469,12 @@ function createStorage(): WxtStorage {
470469
},
471470
setValue: async (value) => {
472471
await migrationsDone;
472+
await setMeta(driver, driverKey, { v: targetVersion });
473+
if (debug === true) {
474+
console.debug(
475+
`[@wxt-dev/storage] Set meta for ${driverKey} v${targetVersion}`,
476+
);
477+
}
473478
return await setItem(driver, driverKey, value);
474479
},
475480
setMeta: async (properties) => {

0 commit comments

Comments
 (0)