Skip to content

Commit 7bce56e

Browse files
committed
Fix: Tweak fragment tag name
1. Get rid of a warning in Firefox. 2. Use correct tag name for React 15.
1 parent 692e8af commit 7bce56e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rsg-components/Preview/Preview.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import splitExampleCode from '../../utils/splitExampleCode';
99
/* eslint-disable no-invalid-this, react/no-multi-comp */
1010

1111
const compileCode = (code, config) => transform(code, config).code;
12-
const wrapCodeInFragment = code => `const __f = React.Fragment || <div />; <__f>${code}</__f>;`;
12+
const wrapCodeInFragment = code =>
13+
`const Fragment__ = React.Fragment || 'div'; <Fragment__>${code}</Fragment__>;`;
1314

1415
// Wrap everything in a React component to leverage the state management
1516
// of this component

0 commit comments

Comments
 (0)