mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
fix: can not remove the mcp server when there is only one element
This commit is contained in:
parent
117af05122
commit
6f33d92b2c
2 changed files with 21 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ export function updateSettingsFilePreservingFormat(
|
|||
fs.writeFileSync(filePath, updatedContent, 'utf-8');
|
||||
}
|
||||
|
||||
function applyUpdates(
|
||||
export function applyUpdates(
|
||||
current: Record<string, unknown>,
|
||||
updates: Record<string, unknown>,
|
||||
): Record<string, unknown> {
|
||||
|
|
@ -50,6 +50,7 @@ function applyUpdates(
|
|||
typeof value === 'object' &&
|
||||
value !== null &&
|
||||
!Array.isArray(value) &&
|
||||
Object.keys(value).length > 0 &&
|
||||
typeof result[key] === 'object' &&
|
||||
result[key] !== null &&
|
||||
!Array.isArray(result[key])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue