chore: check for dev environment for unauth page

This commit is contained in:
afn 2023-03-18 21:09:19 -04:00
parent e9746c5734
commit e8077c8cf4

View File

@ -7,6 +7,7 @@
import LogoOption from '$lib/components/atoms/LogoOption.svelte'; import LogoOption from '$lib/components/atoms/LogoOption.svelte';
import Button from '$lib/components/atoms/Button.svelte'; import Button from '$lib/components/atoms/Button.svelte';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { dev } from '$app/environment';
import questionMark from '$lib/assets/icons/help.svg'; import questionMark from '$lib/assets/icons/help.svg';
import trash from '$lib/assets/icons/delete.svg'; import trash from '$lib/assets/icons/delete.svg';
@ -86,7 +87,7 @@
} catch (err) { } catch (err) {
alert(`Could not exchange the token: ${err}`); alert(`Could not exchange the token: ${err}`);
} }
} else if (localStorage.getItem('killswitch') === null) { } else if (!dev) {
await goto('/poll/unauthorized/'); await goto('/poll/unauthorized/');
} else { } else {
alert('Warning: no token!'); alert('Warning: no token!');