Fix YAML parsing logic bug: replace impossible condition with proper indentation check

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-15 00:27:20 +00:00
parent 188d344547
commit 22e4bb21f0
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ function parseCollectionYaml(filePath) {
} else if (currentObject && leadingSpaces > 0) {
// Property of current object (e.g., display properties)
currentObject[key] = value === "true" ? true : value === "false" ? false : value;
} else if (currentArray && currentObject && leadingSpaces > leadingSpaces) {
} else if (currentArray && currentObject && leadingSpaces > 2) {
// Property of array item object
currentObject[key] = value;
}

View File

@ -99,7 +99,7 @@ function parseCollectionYaml(filePath) {
} else if (currentObject && leadingSpaces > 0) {
// Property of current object (e.g., display properties)
currentObject[key] = value === "true" ? true : value === "false" ? false : value;
} else if (currentArray && currentObject && leadingSpaces > leadingSpaces) {
} else if (currentArray && currentObject && leadingSpaces > 2) {
// Property of array item object
currentObject[key] = value;
}