this repo has no description

moonbase: Fix restart advice getting stuck when changing option for the first time (#181)

TheKodeToad 32cfe8c3 8a885581

Changed files
+9 -2
packages
core-extensions
src
moonbase
webpackModules
+9 -2
packages/core-extensions/src/moonbase/webpackModules/stores.ts
···
}
}
-
const initConfig = typeof initState === "boolean" ? {} : initState?.config ?? {};
-
const newConfig = typeof newState === "boolean" ? {} : newState?.config ?? {};
+
const initConfig = typeof initState === "boolean" ? {} : { ...initState?.config };
+
const newConfig = typeof newState === "boolean" ? {} : { ...newState?.config };
const def = ext.manifest.settings;
if (!def) continue;
+
+
for (const key in def) {
+
const defaultValue = def[key].default;
+
+
initConfig[key] ??= defaultValue;
+
newConfig[key] ??= defaultValue;
+
}
const changedKeys = diff(initConfig, newConfig, { cyclesFix: false }).map((c) => c.path[0]);
for (const key in def) {