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());
|
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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue