mirror of
https://github.com/Damillora/Shioriko.git
synced 2024-11-22 04:17:33 +00:00
fix: fix first time users logged in by mistake
This commit is contained in:
parent
064f61cc89
commit
ee2b7a50c3
@ -1,8 +1,10 @@
|
||||
import { writable } from "svelte/store";
|
||||
|
||||
const storedToken = localStorage.getItem("apiToken");
|
||||
const storedToken = localStorage.getItem("apiToken") ?? "";
|
||||
|
||||
export const token = writable(storedToken);
|
||||
token.subscribe(value => {
|
||||
localStorage.setItem("apiToken", value);
|
||||
if (value != null) {
|
||||
localStorage.setItem("apiToken", value);
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user