We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ce1fd4 commit 0203ccdCopy full SHA for 0203ccd
packages/storage/src/index.ts
@@ -441,7 +441,6 @@ function createStorage(): WxtStorage {
441
442
const newValue = await opts.init();
443
await driver.setItem<any>(driverKey, newValue);
444
- await setMeta(driver, driverKey, { v: targetVersion });
445
return newValue;
446
});
447
@@ -470,6 +469,12 @@ function createStorage(): WxtStorage {
470
469
},
471
setValue: async (value) => {
472
await migrationsDone;
+ 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
+ }
478
return await setItem(driver, driverKey, value);
479
480
setMeta: async (properties) => {
0 commit comments