Skip to content

Commit

Permalink
changed to Array.isArray() instead of check its length
Browse files Browse the repository at this point in the history
  • Loading branch information
msivasubramaniaan committed Mar 9, 2022
1 parent 53fbd1f commit ba09954
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/languageservice/services/yamlCompletion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,7 @@ export class YamlCompletion {
// - item1
// it will treated as a property key since `:` has been appended
if (nodeParent && isSeq(nodeParent) && schema.schema.type !== 'object') {
const isArray = nodeParent.items.length > 0;
this.addSchemaValueCompletions(schema.schema, separatorAfter, collector, {}, isArray);
this.addSchemaValueCompletions(schema.schema, separatorAfter, collector, {}, Array.isArray(nodeParent.items));
}
}

Expand Down

0 comments on commit ba09954

Please sign in to comment.