Browse Source

refac: disable empty model id

Timothy Jaeryang Baek 5 months ago
parent
commit
c5ef53a09f

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

@@ -185,6 +185,10 @@
 										<button
 										<button
 											type="button"
 											type="button"
 											on:click={() => {
 											on:click={() => {
+												if (selectedModelId === '') {
+													return;
+												}
+
 												if (defaultModelIds.includes(selectedModelId)) {
 												if (defaultModelIds.includes(selectedModelId)) {
 													return;
 													return;
 												}
 												}
@@ -209,7 +213,7 @@
 										showResetModal = true;
 										showResetModal = true;
 									}}
 									}}
 								>
 								>
-									{$i18n.t('Delete All Models')}
+									{$i18n.t('Reset All Models')}
 								</button>
 								</button>
 							</Tooltip>
 							</Tooltip>