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:
parent
188d344547
commit
22e4bb21f0
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user