diff --git a/src/routes/console/project-[project]/functions/createVariable.svelte b/src/routes/console/project-[project]/functions/createVariable.svelte index 2654e31c6..0fa4a6706 100644 --- a/src/routes/console/project-[project]/functions/createVariable.svelte +++ b/src/routes/console/project-[project]/functions/createVariable.svelte @@ -16,14 +16,19 @@ const dispatch = createEventDispatcher(); - const handleVariable = () => { + function close() { + showCreate = false; + selectedVar = null; + } + + function handleVariable() { if (selectedVar) { dispatch('updated', pair); } else { dispatch('created', pair); } - showCreate = false; - }; + close(); + } @@ -48,7 +53,7 @@ required /> - +