diff --git a/packages/integrations/react/test/parsed-react-children.test.js b/packages/integrations/react/test/parsed-react-children.test.js index 876897c95f74..1c845836f37f 100644 --- a/packages/integrations/react/test/parsed-react-children.test.js +++ b/packages/integrations/react/test/parsed-react-children.test.js @@ -1,15 +1,15 @@ import { expect } from 'chai'; -import convert from "../vnode-children.js"; +import convert from '../vnode-children.js'; describe('experimental react children', () => { - it('has undefined as children for direct children', () => { - const [ imgVNode ] = convert(''); - expect(imgVNode.props).to.deep.include({ children: undefined }); - }) + it('has undefined as children for direct children', () => { + const [imgVNode] = convert(''); + expect(imgVNode.props).to.deep.include({ children: undefined }); + }); - it('has undefined as children for nested children', () => { - const [ divVNode ] = convert('
'); - const [ imgVNode ] = divVNode.props.children; - expect(imgVNode.props).to.deep.include({ children: undefined }); - }) -}) + it('has undefined as children for nested children', () => { + const [divVNode] = convert(''); + const [imgVNode] = divVNode.props.children; + expect(imgVNode.props).to.deep.include({ children: undefined }); + }); +}); diff --git a/packages/integrations/react/vnode-children.js b/packages/integrations/react/vnode-children.js index 5fd421e67f71..0b26ef4239af 100644 --- a/packages/integrations/react/vnode-children.js +++ b/packages/integrations/react/vnode-children.js @@ -8,11 +8,10 @@ export default function convert(children) { let key = 0; function createReactElementFromNode(node) { - const childVnodes = Array.isArray(node.children) && node.children.length - ? node.children - .map((child) => createReactElementFromNode(child)) - .filter(Boolean) - : undefined; + const childVnodes = + Array.isArray(node.children) && node.children.length + ? node.children.map((child) => createReactElementFromNode(child)).filter(Boolean) + : undefined; if (node.type === DOCUMENT_NODE) { return createElement(Fragment, {}, childVnodes);