aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-11-10 17:31:42 -0800
committerAdam Soltys <[email protected]>2022-11-10 17:31:42 -0800
commite059303b7803c3646777022ee0f4f12e502d0ff5 (patch)
treecf78609c366887f462dbdec5823346309c4c096a
parenta8cb53b7422d133edb06cb89aa2048a7e06ea417 (diff)
downloadcoinos-ui-e059303b7803c3646777022ee0f4f12e502d0ff5.tar.gz
coinos-ui-e059303b7803c3646777022ee0f4f12e502d0ff5.zip
don't clear redirect
-rw-r--r--src/components/RegisterOrLogin.svelte6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/components/RegisterOrLogin.svelte b/src/components/RegisterOrLogin.svelte
index 84d0dd16..32f046d0 100644
--- a/src/components/RegisterOrLogin.svelte
+++ b/src/components/RegisterOrLogin.svelte
@@ -13,8 +13,6 @@
let code = [];
let redirect;
- $: $loginRedirect && (redirect = $loginRedirect, $loginRedirect = undefined);
-
$: need2fa = form?.message === '2fa';
$: if (need2fa) tokenInput && tick().then(tokenInput.focusFirstInput);
@@ -84,8 +82,8 @@
{/if}
<form class="space-y-5" {action} method="POST" use:enhance>
- {#if redirect}
- <input type="hidden" name="loginRedirect" value={redirect} />
+ {#if $loginRedirect}
+ <input type="hidden" name="loginRedirect" value={$loginRedirect} />
{/if}
<div>