From 4f0a93ce128bd79de2013fefc63f852e7715ad6e Mon Sep 17 00:00:00 2001 From: Arman Date: Mon, 7 Apr 2025 11:32:27 +0200 Subject: [PATCH] fix: runtime not being applied --- .../create-function/template-[template]/+page.svelte | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/routes/(console)/project-[project]/functions/create-function/template-[template]/+page.svelte b/src/routes/(console)/project-[project]/functions/create-function/template-[template]/+page.svelte index 6441eddce..c89d0b097 100644 --- a/src/routes/(console)/project-[project]/functions/create-function/template-[template]/+page.svelte +++ b/src/routes/(console)/project-[project]/functions/create-function/template-[template]/+page.svelte @@ -69,9 +69,6 @@ let specification = specificationOptions[0].value; onMount(async () => { - if (page.url.searchParams.has('runtime')) { - runtime = page.url.searchParams.get('runtime') as Runtime; - } if (!$installation?.$id) { $installation = data.installations.installations[0]; } @@ -87,7 +84,11 @@ const versionB = b.split('-')[1]; return versionB.localeCompare(versionA, undefined, { numeric: true }); }); - runtime = matchingRuntimes[0]; + if (page.url.searchParams.has('runtime')) { + runtime = page.url.searchParams.get('runtime') as Runtime; + } else { + runtime = matchingRuntimes[0]; + } } }); @@ -249,7 +250,6 @@ bind:specification {specificationOptions} {options} /> -