mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-28 07:50:25 +01:00
add fallback in case the collection name in the response was stripped
This commit is contained in:
1 parent
0bd712752f
commit
5a8eae7089
1 file changed
+1
-1
@@ -133,7 +133,7 @@ class AppAuthStore extends LocalAuthStore {
|
|||||||
const pb = new PocketBase(import.meta.env.PB_BACKEND_URL, new AppAuthStore());
|
const pb = new PocketBase(import.meta.env.PB_BACKEND_URL, new AppAuthStore());
|
||||||
|
|
||||||
if (pb.authStore.isValid) {
|
if (pb.authStore.isValid) {
|
||||||
pb.collection(pb.authStore.record.collectionName)
|
pb.collection(pb.authStore.record.collectionName || "_superusers")
|
||||||
.authRefresh()
|
.authRefresh()
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.warn("Failed to refresh the existing auth token:", err);
|
console.warn("Failed to refresh the existing auth token:", err);
|
||||||
|
|||||||
Reference in new issue
Block a user