Fix trailing comment output when the printer returns a doc instead of a string. (#5930)
Previously, Prettier printed `[Object object]` in that situation.master
parent
aec3978a13
commit
3a9006659e
|
@ -443,7 +443,10 @@ function printTrailingComment(commentPath, print, options) {
|
|||
return concat([" ", contents]);
|
||||
}
|
||||
|
||||
return concat([lineSuffix(" " + contents), !isBlock ? breakParent : ""]);
|
||||
return concat([
|
||||
lineSuffix(concat([" ", contents])),
|
||||
!isBlock ? breakParent : ""
|
||||
]);
|
||||
}
|
||||
|
||||
function printDanglingComments(path, options, sameIndent, filter) {
|
||||
|
|
Loading…
Reference in New Issue