Skip to content

Commit 87285ef

Browse files
committed
isReturningJSX works for fragments
1 parent 4b8128a commit 87285ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/Components.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function componentRule(rule, context) {
152152
}
153153

154154
const returnsJSX = node[property]
155-
&& node[property].type === 'JSXElement';
155+
&& (node[property].type === 'JSXElement' || node[property].type === 'JSXFragment');
156156
const returnsReactCreateElement = node[property]
157157
&& node[property].callee
158158
&& node[property].callee.property

0 commit comments

Comments
 (0)