add fallback in case the collection name in the response was stripped
This commit is contained in:
parent
0bd712752f
commit
5a8eae7089
|
|
@ -133,7 +133,7 @@ class AppAuthStore extends LocalAuthStore {
|
|||
const pb = new PocketBase(import.meta.env.PB_BACKEND_URL, new AppAuthStore());
|
||||
|
||||
if (pb.authStore.isValid) {
|
||||
pb.collection(pb.authStore.record.collectionName)
|
||||
pb.collection(pb.authStore.record.collectionName || "_superusers")
|
||||
.authRefresh()
|
||||
.catch((err) => {
|
||||
console.warn("Failed to refresh the existing auth token:", err);
|
||||
|
|
|
|||
Loading…
Reference in New Issue