Skip to content

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

chore: use watch instead of watchEffect (#9933)

boojack506a44f97960
diff --git a/frontend/src/components/ProjectVersionControlPanel.vue b/frontend/src/components/ProjectVersionControlPanel.vue
index 18349d9d58..7da648c56a 100644
--- a/frontend/src/components/ProjectVersionControlPanel.vue
+++ b/frontend/src/components/ProjectVersionControlPanel.vue
@@ -87,7 +87,7 @@
</template>
<script lang="ts" setup>
-import { reactive, watchEffect, watch } from "vue";
+import { reactive, watch } from "vue";
import { computed, PropType } from "vue";
import { useI18n } from "vue-i18n";
import { pushNotification, useRepositoryV1Store, useVCSV1Store } from "@/store";
@@ -122,15 +122,21 @@ const state = reactive<LocalState>({
showWizardForChange: false,
});
-watchEffect(async () => {
- const repo = await repositoryV1Store.getOrFetchRepositoryByProject(
- props.project.name,
- true /* silent */
- );
- if (repo) {
- await vcsV1Store.fetchVCSByUid(repo.vcsUid);
+watch(
+ () => [props.project.name],
+ async () => {
+ const repo = await repositoryV1Store.getOrFetchRepositoryByProject(
+ props.project.name,
+ true /* silent */
+ );
+ if (repo) {
+ await vcsV1Store.fetchVCSByUid(repo.vcsUid);
+ }
+ },
+ {
+ immediate: true,
}
-});
+);
watch(
() => props.project.workflow,