Skip to content

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

fix: fetch database (#15477)

ecmadaod25b0e17a0c8
diff --git a/frontend/src/store/modules/v1/database.ts b/frontend/src/store/modules/v1/database.ts
index 8d074cc8b8..984fc88f24 100644
--- a/frontend/src/store/modules/v1/database.ts
+++ b/frontend/src/store/modules/v1/database.ts
@@ -221,12 +221,10 @@ export const useDatabaseV1ByName = (name: MaybeRef<string>) => {
watch(
() => unref(name),
(name) => {
- if (!isValidDatabaseName(store.getDatabaseByName(name).name)) {
- ready.value = false;
- store.fetchDatabaseByName(name).then(() => {
- ready.value = true;
- });
- }
+ ready.value = false;
+ store.getOrFetchDatabaseByName(name).then(() => {
+ ready.value = true;
+ });
},
{ immediate: true }
);