diff --git a/src/languageservice/services/yamlCompletion.ts b/src/languageservice/services/yamlCompletion.ts index b8c13395..f455364a 100644 --- a/src/languageservice/services/yamlCompletion.ts +++ b/src/languageservice/services/yamlCompletion.ts @@ -1113,8 +1113,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); }