diff --git a/index.js b/index.js index ed747e9..b3377b8 100644 --- a/index.js +++ b/index.js @@ -64,10 +64,11 @@ function isTreeDone(node, excludeComponentNames) { function isSubtreeDone(node) { return ( - node.type === 'JSXElement' && - node.openingElement.attributes.find( - (attributeNode) => attributeNode.name?.name === 'data-component', - ) + node.type === 'JSXFragment' || + (node.type === 'JSXElement' && + node.openingElement.attributes.find( + (attributeNode) => attributeNode.name?.name === 'data-component', + )) ); }