spreading default config instead of referencing

This commit is contained in:
Miodec 2022-03-04 15:51:10 +01:00
parent 31ac2a4b40
commit db46b5e380
2 changed files with 7 additions and 3 deletions

View file

@ -1821,8 +1821,10 @@ export function apply(
}
export function reset(): void {
config = DefaultConfig;
apply(DefaultConfig);
config = {
...DefaultConfig,
};
apply(config);
saveFullConfigToLocalStorage();
}

View file

@ -95,7 +95,9 @@ export async function initSnapshot(): Promise<
// }
// LoadingPage.updateText("Downloading config...");
if (configData) {
const newConfig = DefaultConfig;
const newConfig = {
...DefaultConfig,
};
for (const key in configData.config) {
const value = configData.config[key];