Skip to content

Commit 2bfb82f

Browse files
author
tim
committed
fixes double parentheses for JSXFragments too
1 parent 91896cf commit 2bfb82f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/printer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,9 @@ function genericPrintNoParens(path: any, options: any, print: any) {
661661
parts.push("return");
662662

663663
if (n.argument) {
664-
const argIsJsxElement = namedTypes.JSXElement?.check(n.argument)
664+
const argIsJsxElement =
665+
namedTypes.JSXElement?.check(n.argument) ||
666+
namedTypes.JSXFragment?.check(n.argument)
665667

666668
let argLines = path.call(print, "argument");
667669
if (

0 commit comments

Comments
 (0)