Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,13 @@ watch(
)

// 组件挂载时加载配置
let unwatch: () => void // only use here, so declare it here
let unwatch: (() => void) | undefined
onMounted(async () => {
unwatch = watch(
() => mcpStore.config.ready,
async (ready) => {
if (ready) {
unwatch() // only run once to avoid multiple calls
unwatch?.() // only run once to avoid multiple calls
await loadDifyConfigFromMcp()
}
},
Expand All @@ -434,8 +434,6 @@ onMounted(async () => {

// cancel the watch to avoid memory leaks
onUnmounted(() => {
if (unwatch) {
unwatch()
}
unwatch?.()
})
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,13 @@ watch(
)

// 组件挂载时加载配置
let unwatch: () => void // only use here, so declare it here
let unwatch: (() => void) | undefined
onMounted(async () => {
unwatch = watch(
() => mcpStore.config.ready,
async (ready) => {
if (ready) {
unwatch() // only run once to avoid multiple calls
unwatch?.() // only run once to avoid multiple calls
await loadFastGptConfigFromMcp()
}
},
Expand All @@ -433,8 +433,6 @@ onMounted(async () => {

// cancel the watch to avoid memory leaks
onUnmounted(() => {
if (unwatch) {
unwatch()
}
unwatch?.()
})
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,13 @@ watch(
)

// 组件挂载时加载配置
let unwatch: () => void // only use here, so declare it here
let unwatch: (() => void) | undefined
onMounted(async () => {
unwatch = watch(
() => mcpStore.config.ready,
async (ready) => {
if (ready) {
unwatch() // only run once to avoid multiple calls
unwatch?.() // only run once to avoid multiple calls
await loadRagflowConfigFromMcp()
}
},
Expand All @@ -451,8 +451,6 @@ onMounted(async () => {

// cancel the watch to avoid memory leaks
onUnmounted(() => {
if (unwatch) {
unwatch()
}
unwatch?.()
})
</script>