Fix an issue with the migration test failing intermittently.
This commit is contained in:
parent
089ea3d5ab
commit
5f6cf4a6de
|
@ -1,4 +1,4 @@
|
|||
import {createValue} from "@holllo/webextension-storage";
|
||||
import {createValue, type Value} from "@holllo/webextension-storage";
|
||||
import browser from "webextension-polyfill";
|
||||
import {Data, Feature} from "./enums.js";
|
||||
import {collectHideTopicsData} from "./hide-topics.js";
|
||||
|
|
|
@ -50,6 +50,7 @@ export const migrations: Array<Migration<string>> = [
|
|||
await version.save();
|
||||
|
||||
const enabledFeatures = await fromStorage(Data.EnabledFeatures);
|
||||
enabledFeatures.value.clear();
|
||||
for (const [key, value] of Object.entries(data.features)) {
|
||||
if (value) {
|
||||
const snakeCasedKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
||||
|
|
Loading…
Reference in New Issue