Skip to content

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

chore: fix cannot access isValidID error (#6794)

Danny Xu4aa3455adf06
diff --git a/frontend/src/views/SyncDatabaseSchema/index.vue b/frontend/src/views/SyncDatabaseSchema/index.vue
index 208b8d0d84..12ac4652c0 100644
--- a/frontend/src/views/SyncDatabaseSchema/index.vue
+++ b/frontend/src/views/SyncDatabaseSchema/index.vue
@@ -194,6 +194,13 @@ const state = reactive<LocalState>({
showFeatureModal: false,
});
+const isValidId = (id: any): id is string => {
+ if (isNull(id) || isUndefined(id) || String(id) === String(UNKNOWN_ID)) {
+ return false;
+ }
+ return true;
+};
+
const database = computed(() => {
const databaseId = state.sourceSchema.databaseId;
if (!isValidId(databaseId)) {
@@ -291,13 +298,6 @@ const handleSchemaVersionSelect = (changeHistory: ChangeHistory) => {
state.sourceSchema.changeHistory = changeHistory;
};
-const isValidId = (id: any): id is string => {
- if (isNull(id) || isUndefined(id) || String(id) === String(UNKNOWN_ID)) {
- return false;
- }
- return true;
-};
-
const tryChangeStep = async (
oldStep: number,
newStep: number,