From c302b3cb7d8b9e5f6633cf74ef435ebd86ed7b0f Mon Sep 17 00:00:00 2001
From: Elvy <88881326+EepyElvyra@users.noreply.github.com>
Date: Fri, 3 Jan 2025 20:59:41 +0100
Subject: [PATCH] fixes
---
src/api/Settings.ts | 1 +
.../components/SettingArrayComponent.tsx | 20 ++++---------------
src/plugins/_api/settingArrays.tsx | 2 +-
src/utils/types.ts | 3 ++-
4 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/src/api/Settings.ts b/src/api/Settings.ts
index 0227c4e7f..b2ee81502 100644
--- a/src/api/Settings.ts
+++ b/src/api/Settings.ts
@@ -224,6 +224,7 @@ export function migrateSettingsToArrays(pluginName: string, settings: string[],
for (const setting of settings) {
if (SettingsStore.plain.plugins[pluginName] === undefined || typeof SettingsStore.plain.plugins[pluginName][setting] !== "string") continue;
logger.info(`Migrating setting ${setting} from ${pluginName} to list`);
+ // @ts-ignore
if (SettingsStore.plain.plugins[pluginName][setting] === "") SettingsStore.plain.plugins[pluginName][setting] = SettingsStore.plain.plugins[pluginName][setting].default ?? [];
else SettingsStore.plain.plugins[pluginName][setting] = SettingsStore.plain.plugins[pluginName][setting].split(stringSeparator);
}
diff --git a/src/components/PluginSettings/components/SettingArrayComponent.tsx b/src/components/PluginSettings/components/SettingArrayComponent.tsx
index c208e84db..3980ea164 100644
--- a/src/components/PluginSettings/components/SettingArrayComponent.tsx
+++ b/src/components/PluginSettings/components/SettingArrayComponent.tsx
@@ -1,20 +1,8 @@
/*
- * Vencord, a modification for Discord's desktop app
- * Copyright (c) 2022 Vendicated and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see