Skip to content

Commit

Permalink
chore: accept null,0,emptyString in default or const property
Browse files Browse the repository at this point in the history
  • Loading branch information
p-spacek committed May 29, 2024
1 parent fae39cd commit 26ec17a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/languageservice/services/yamlCompletion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,8 @@ export class YamlCompletion {
case 'number':
case 'integer':
case 'anyOf': {
let value = propertySchema.default || propertySchema.const;
if (value) {
let value = propertySchema.default === undefined ? propertySchema.const : propertySchema.default;
if (isDefined(value)) {
if (type === 'string' || typeof value === 'string') {
value = convertToStringValue(value);
}
Expand Down

0 comments on commit 26ec17a

Please sign in to comment.