diff --git a/src/lib/wizards/functions/cover.svelte b/src/lib/wizards/functions/cover.svelte index fdf925f62d..3ee34835f3 100644 --- a/src/lib/wizards/functions/cover.svelte +++ b/src/lib/wizards/functions/cover.svelte @@ -107,21 +107,20 @@ {/each} {:then response} - {@const runtimes = response.runtimes} - {#each quickStart.runtimes.filter((_template, index) => index < 6) as runtime} - {@const runtimeDetail = runtimes.find( - (r) => r.$id === runtime.name - )} + {@const runtimes = new Map(response.runtimes.map((r) => [r.$id, r]))} + {@const templates = quickStart.runtimes.filter(_template => runtimes.has(_template.name))} + {#each templates.slice(0, 6) as template} + {@const runtimeDetail = runtimes.get(template.name)}
  • {/each} - {#if quickStart.runtimes.length < 6} + {#if templates.length > 5}