Skip to content

Commit

Permalink
Delete redundant branch in ReactElement and HTMLElement plugins (jest…
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrottimark authored and cpojer committed Jun 4, 2017
1 parent a025aa5 commit e4ad481
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions packages/pretty-format/src/plugins/HTMLElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ function isHTMLElement(value: any) {
function printChildren(flatChildren, print, indent, colors, opts) {
return flatChildren
.map(node => {
if (typeof node === 'object') {
return print(node);
} else if (typeof node === 'string') {
if (typeof node === 'string') {
return colors.content.open + escapeHTML(node) + colors.content.close;
} else {
return print(node);
Expand Down
4 changes: 1 addition & 3 deletions packages/pretty-format/src/plugins/ReactElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ function traverseChildren(opaqueChildren, cb) {
function printChildren(flatChildren, print, indent, colors, opts) {
return flatChildren
.map(node => {
if (typeof node === 'object') {
return print(node);
} else if (typeof node === 'string') {
if (typeof node === 'string') {
return colors.content.open + escapeHTML(node) + colors.content.close;
} else {
return print(node);
Expand Down

0 comments on commit e4ad481

Please sign in to comment.