This commit is contained in:
Anton Bracke 2022-02-22 14:09:36 +01:00
parent 3f21befdc6
commit 1425513452
No known key found for this signature in database
GPG Key ID: B1222603899C6B25

View File

@ -36,9 +36,9 @@ function set<T extends keyof SettingsData>(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);
}