Skip to content

Commit 503dcc2

Browse files
Explicitly convert display name to string
An React Elements displayName is not necessarily a string and Symbols are not automatically converted to strings.
1 parent 4974512 commit 503dcc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/formatter/formatReactElementNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export default (
203203
out += '\n';
204204
out += spacer(newLvl - 1, tabStop);
205205
}
206-
out += `</${displayName}>`;
206+
out += `</${displayName.toString()}>`;
207207
} else {
208208
if (
209209
!isInlineAttributeTooLong(

0 commit comments

Comments
 (0)