Skip to content

Commit 4396dc2

Browse files
author
Artem Sapegin
committed
Fix: Correct tag name for Fragment (div) wrapping in React before 16.2
1 parent 1e2aff3 commit 4396dc2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/rsg-components/Preview/Preview.js

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

1111
const Fragment = React.Fragment ? React.Fragment : 'div';
12-
const FragmentTag = React.Fragment ? 'React.Fragment' : "'div'";
12+
const FragmentTag = React.Fragment ? 'React.Fragment' : 'div';
1313

1414
const compileCode = (code, config) => transform(code, config).code;
1515
const wrapCodeInFragment = code => `<${FragmentTag}>${code}</${FragmentTag}>;`;

0 commit comments

Comments
 (0)