mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: remove try catch from user store #discussion_r909402785
This commit is contained in:
1 parent
98d6b77593
commit
5e2e57a352
2 files changed
+1
-9
No files matched your search
@@ -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());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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')) {
|
||||
|
||||
Reference in new issue
Block a user