From 7cec88c776bf6c0eaad1f200b4a4d0300f8ad665 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 29 May 2024 22:27:10 -0700 Subject: [PATCH] fix --- src/lib/components/admin/Settings/Pipelines.svelte | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lib/components/admin/Settings/Pipelines.svelte b/src/lib/components/admin/Settings/Pipelines.svelte index 834957551..c620bd799 100644 --- a/src/lib/components/admin/Settings/Pipelines.svelte +++ b/src/lib/components/admin/Settings/Pipelines.svelte @@ -89,11 +89,15 @@ valves = null; valves_spec = null; - pipelines = await getPipelines(localStorage.token, selectedPipelinesUrlIdx); + if (PIPELINES_LIST.length > 0) { + pipelines = await getPipelines(localStorage.token, selectedPipelinesUrlIdx); - if (pipelines.length > 0) { - selectedPipelineIdx = 0; - await getValves(selectedPipelineIdx); + if (pipelines.length > 0) { + selectedPipelineIdx = 0; + await getValves(selectedPipelineIdx); + } + } else { + pipelines = []; } }; @@ -136,6 +140,7 @@ onMount(async () => { PIPELINES_LIST = await getPipelinesList(localStorage.token); + console.log(PIPELINES_LIST); if (PIPELINES_LIST.length > 0) { selectedPipelinesUrlIdx = PIPELINES_LIST[0]['idx'];