diff --git a/desktop/electron/src/settings.ts b/desktop/electron/src/settings.ts index 97a8e67a..935c4968 100644 --- a/desktop/electron/src/settings.ts +++ b/desktop/electron/src/settings.ts @@ -36,9 +36,9 @@ function set(key: T | SettingsData, value?: Settin throw new Error("Settings not initialized"); } - if (typeof key === "string") { + if (typeof key === "string" && value !== undefined) { settings[key] = value; - } else { + } else if (typeof key !== "string") { Object.assign(settings, key); }