|
|
@@ -14,11 +14,16 @@
|
|
|
});
|
|
|
|
|
|
onMount(() => {
|
|
|
- const storedAuth = localStorage.getItem('auth');
|
|
|
- if (storedAuth) {
|
|
|
- auth.set(JSON.parse(storedAuth));
|
|
|
+ try {
|
|
|
+ const storedAuth = localStorage.getItem('auth');
|
|
|
+ if (storedAuth) {
|
|
|
+ auth.set(JSON.parse(storedAuth));
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('Error parsing stored auth:', error);
|
|
|
+ } finally {
|
|
|
+ isLoading = false;
|
|
|
}
|
|
|
- isLoading = false;
|
|
|
});
|
|
|
|
|
|
async function submit(event) {
|