1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-24 07:04:51 +02:00

add fallback in case the collection name in the response was stripped

This commit is contained in:
Gani Georgiev
2025-10-23 10:55:04 +03:00
parent 0bd712752f
commit 5a8eae7089

View File

@@ -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);