Skip to content

Commit

Permalink
printer: use wrap util function in more places (#2934)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Feb 21, 2021
1 parent b6b2789 commit d0eae6f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/language/printer.js
Expand Up @@ -180,12 +180,7 @@ const printDocASTReducer: any = {
UnionTypeDefinition: ({ description, name, directives, types }) =>
wrap('', description, '\n') +
join(
[
'union',
name,
join(directives, ' '),
types && types.length !== 0 ? '= ' + join(types, ' | ') : '',
],
['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))],
' ',
),

Expand Down Expand Up @@ -253,7 +248,7 @@ const printDocASTReducer: any = {
'extend union',
name,
join(directives, ' '),
types && types.length !== 0 ? '= ' + join(types, ' | ') : '',
wrap('= ', join(types, ' | ')),
],
' ',
),
Expand Down

0 comments on commit d0eae6f

Please sign in to comment.