Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix(frontend): prevent infinite BatchGetProjects API calls (#18591)

boojack75dc8b55c819
diff --git a/frontend/src/components/Project/useRecentProjects.ts b/frontend/src/components/Project/useRecentProjects.ts
index 67406289bb..a34406e670 100644
--- a/frontend/src/components/Project/useRecentProjects.ts
+++ b/frontend/src/components/Project/useRecentProjects.ts
@@ -1,6 +1,10 @@
import { computedAsync } from "@vueuse/core";
import { computed } from "vue";
-import { useCurrentUserV1, useProjectV1Store } from "@/store";
+import {
+ batchGetOrFetchProjects,
+ useCurrentUserV1,
+ useProjectV1Store,
+} from "@/store";
import { isValidProjectName } from "@/types";
import { hasProjectPermissionV2, useDynamicLocalStorage } from "@/utils";
@@ -36,7 +40,7 @@ export const useRecentProjects = () => {
const projects = [];
const invalidProjects: string[] = [];
- await projectV1Store.batchGetProjects(recentViewProjectNames.value);
+ await batchGetOrFetchProjects(recentViewProjectNames.value);
for (const projectName of recentViewProjectNames.value) {
try {