Removed top-level await
parent
2985c58dd6
commit
3af6d96d28
|
|
@ -6,11 +6,9 @@ export const pb = new PocketBase(import.meta.env.VITE_POCKETBASE_URL);
|
|||
export const currentUser = ref();
|
||||
|
||||
if (pb.authStore.isValid) {
|
||||
try {
|
||||
await pb.collection("users").authRefresh();
|
||||
} catch (err) {
|
||||
pb.authStore.clear();
|
||||
}
|
||||
pb.collection("users")
|
||||
.authRefresh()
|
||||
.catch((_) => pb.authStore.clear());
|
||||
}
|
||||
|
||||
pb.authStore.onChange(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue