Browse Source

fix: unnecesary double loop

Carlos Daniel Vilaseca 1 year ago
parent
commit
30c94ff10f
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/lib/components/chat/Settings/Interface.svelte

+ 6 - 4
src/lib/components/chat/Settings/Interface.svelte

@@ -191,10 +191,12 @@
 						placeholder="Select a model"
 					>
 						<option value="" selected>Current Model</option>
-						{#each $models.filter((m) => m.size != null) as model}
-							<option value={model.name} class="bg-gray-100 dark:bg-gray-700"
-								>{model.name + ' (' + (model.size / 1024 ** 3).toFixed(1) + ' GB)'}</option
-							>
+						{#each $models as model}
+							{#if model.size != null}
+								<option value={model.name} class="bg-gray-100 dark:bg-gray-700">
+									{model.name + ' (' + (model.size / 1024 ** 3).toFixed(1) + ' GB)'}
+								</option>
+							{/if}
 						{/each}
 					</select>
 				</div>