fix: improve formatting and add JSON validation in McpServersDialog

--bug=1060753 --user=刘瑞斌 【应用】AI对话节点的MCP使用自定义方式,配置格式错误依然可以保存成功 https://www.tapd.cn/62980211/s/1760128
v3.2
CaptainB 2025-08-22 16:21:51 +08:00
parent c39d7a4102
commit 600cd73d2d
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ const submit = () => {
paramFormRef.value.validate((valid: any) => {
if (valid) {
try {
JSON.parse(form.value.mcp_servers)
JSON.parse(form.value.mcp_servers || '{}')
} catch (e) {
MsgError(t('views.applicationWorkflow.nodes.mcpNode.mcpServerTip'))
return