fix: remove try catch from user store #discussion_r909402785

This commit is contained in:
Arman committed 2022-06-29 14:06:31 +02:00
1 parent 98d6b77593
commit 5e2e57a352
2 files changed
+1 -9

No files matched your search

+1 -5
View File
@@ -9,11 +9,7 @@ function createUserStore() {
subscribe,
set,
fetchUser: async () => {
try {
set(await sdkForConsole.account.get());
} catch (error) {
//TODO: take care what happens here
}
set(await sdkForConsole.account.get());
}
};
}
-4
View File
@@ -15,11 +15,7 @@
onMount(async () => {
try {
if (!$user) {
//TODO: find out if it's the correct implementation
await user.fetchUser();
if (!$user) {
throw 'No user found';
}
}
if (!$page.url.pathname.startsWith('/console')) {