Skip to content

Commit

Permalink
fix skip
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Jul 17, 2020
1 parent 155eaf7 commit 436f939
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const renderJsx = (code: React.ReactElement, options: Required<JSXOptions>) => {
}
}

if (typeof code === 'undefined') {
if (typeof renderedJSX === 'undefined') {
// eslint-disable-next-line no-console
return console.warn('Too many skip or undefined component');
}
Expand All @@ -96,7 +96,7 @@ const renderJsx = (code: React.ReactElement, options: Required<JSXOptions>) => {
}
: options;

return React.Children.map(code, c => {
return React.Children.map(renderedJSX, c => {
let string = applyBeforeRender(
reactElementToJSXString(c, ooo as Options),
options
Expand Down

0 comments on commit 436f939

Please sign in to comment.