Timothy Jaeryang Baek hai 5 meses
pai
achega
ede29e98b7

+ 5 - 2
src/lib/components/admin/Settings/Models/ConfigureModelsModal.svelte

@@ -51,8 +51,11 @@
 	onMount(async () => {
 	onMount(async () => {
 		config = await getModelsConfig(localStorage.token);
 		config = await getModelsConfig(localStorage.token);
 
 
-		defaultModelIds = (config?.DEFAULT_MODELS ?? '').split(',').filter((id) => id);
-
+		if (config?.DEFAULT_MODELS) {
+			defaultModelIds = (config?.DEFAULT_MODELS).split(',').filter((id) => id);
+		} else {
+			defaultModelIds = [];
+		}
 		const modelOrderList = config.MODEL_ORDER_LIST || [];
 		const modelOrderList = config.MODEL_ORDER_LIST || [];
 		const allModelIds = $models.map((model) => model.id);
 		const allModelIds = $models.map((model) => model.id);