Skip to content

Commit 5d0d111

Browse files
committed
Fix
1 parent d4eb823 commit 5d0d111

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

specification/compiler/model/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export function hoistTypeAnnotations (type: model.TypeDefinition, jsDocs: JSDoc[
517517
const tags = parseJsDocTags(jsDocs)
518518
if (jsDocs.length === 1) {
519519
const description = jsDocs[0].getDescription()
520-
if (description != null) type.description = description.split(EOL).filter(Boolean).join(EOL)
520+
if (description.length > 0) type.description = description.split(EOL).filter(Boolean).join(EOL)
521521
}
522522

523523
setTags(jsDocs, type, tags, validTags, (tags, tag, value) => {
@@ -544,7 +544,7 @@ function hoistPropertyAnnotations (property: model.Property, jsDocs: JSDoc[]): v
544544
const tags = parseJsDocTags(jsDocs)
545545
if (jsDocs.length === 1) {
546546
const description = jsDocs[0].getDescription()
547-
if (description != null) property.description = description.split(EOL).filter(Boolean).join(EOL)
547+
if (description.length > 0) property.description = description.split(EOL).filter(Boolean).join(EOL)
548548
}
549549

550550
setTags(jsDocs, property, tags, validTags, (tags, tag, value) => {
@@ -589,7 +589,7 @@ function hoistEnumMemberAnnotations (member: model.EnumMember, jsDocs: JSDoc[]):
589589
const tags = parseJsDocTags(jsDocs)
590590
if (jsDocs.length === 1) {
591591
const description = jsDocs[0].getDescription()
592-
if (description != null) member.description = description.split(EOL).filter(Boolean).join(EOL)
592+
if (description.length > 0) member.description = description.split(EOL).filter(Boolean).join(EOL)
593593
}
594594

595595
setTags(jsDocs, member, tags, validTags, (tags, tag, value) => {

0 commit comments

Comments
 (0)