fix: unnecesary double loop

This commit is contained in:
Carlos Daniel Vilaseca 2024-02-29 12:37:46 -05:00
parent 5745b9c5db
commit 30c94ff10f

View File

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