From 6c23c7f7187d0265d247a36e2516617bf328766d Mon Sep 17 00:00:00 2001 From: Cyrus Goh Date: Thu, 5 Dec 2024 18:49:10 -0800 Subject: [PATCH] revert previous states set on mount --- .../projects/environment-variables/EditDialog.svelte | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web-admin/src/features/projects/environment-variables/EditDialog.svelte b/web-admin/src/features/projects/environment-variables/EditDialog.svelte index 1c39dd722f8..222a4fc1397 100644 --- a/web-admin/src/features/projects/environment-variables/EditDialog.svelte +++ b/web-admin/src/features/projects/environment-variables/EditDialog.svelte @@ -28,6 +28,7 @@ getEnvironmentType, isDuplicateKey, } from "./utils"; + import { onMount } from "svelte"; export let open = false; export let id: string; @@ -40,8 +41,8 @@ isDevelopment: boolean; isProduction: boolean; }; - let isDevelopment: boolean; - let isProduction: boolean; + let isDevelopment = false; + let isProduction = false; let isKeyAlreadyExists = false; let inputErrors: { [key: number]: boolean } = {}; @@ -248,6 +249,10 @@ }; } + onMount(() => { + handleDialogOpen(); + }); + $: if (open) { handleDialogOpen(); }