From 5a8eae7089db9f6b7930fcc3f7a28df3568038cf Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Thu, 23 Oct 2025 10:55:04 +0300 Subject: [PATCH] add fallback in case the collection name in the response was stripped --- ui/src/utils/ApiClient.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/utils/ApiClient.js b/ui/src/utils/ApiClient.js index 2c955895..4c4d3c45 100644 --- a/ui/src/utils/ApiClient.js +++ b/ui/src/utils/ApiClient.js @@ -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);