From 69f40d6b4ee29d9ac9302aa677d46f98985de497 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 14 Jan 2021 17:46:59 +0000 Subject: [PATCH] Fixing an issue with updating not recognising apps not deployed yet. --- .../src/components/settings/tabs/General.svelte | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/settings/tabs/General.svelte b/packages/builder/src/components/settings/tabs/General.svelte index 55d7312f37..deb1602957 100644 --- a/packages/builder/src/components/settings/tabs/General.svelte +++ b/packages/builder/src/components/settings/tabs/General.svelte @@ -54,8 +54,14 @@ await hostingStore.actions.fetchDeployedApps() const existingAppNames = get(hostingStore).deployedAppNames const existingAppUrls = get(hostingStore).deployedAppUrls - existingAppNames.splice(existingAppNames.indexOf(get(store).name), 1) - existingAppUrls.splice(existingAppUrls.indexOf(get(store).url), 1) + const nameIdx = existingAppNames.indexOf(get(store).name) + const urlIdx = existingAppUrls.indexOf(get(store).url) + if (nameIdx !== -1) { + existingAppNames.splice(nameIdx, 1) + } + if (urlIdx !== -1) { + existingAppUrls.splice(urlIdx, 1) + } nameValidation = { name: string() .required(nameError)