diff --git a/frontend/src/views/SoftSettings/controller/index.tsx b/frontend/src/views/SoftSettings/controller/index.tsx index 8099d91..de1ae7b 100644 --- a/frontend/src/views/SoftSettings/controller/index.tsx +++ b/frontend/src/views/SoftSettings/controller/index.tsx @@ -220,7 +220,11 @@ function formatEnv(val: Record) { * @returns {string[]} 恢复后的参数值 */ function receveArgs(val: string) { - return val.split('\n'); + if (val) { + return val.split('\n'); + } else { + return [] + } } /** * @description 恢复环境变量 @@ -492,4 +496,4 @@ export async function saveMcpConfigFile(obj: Record) { } else { message.error(res.msg!); } -} \ No newline at end of file +}