Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Wildhoney committed Jun 11, 2023
1 parent d92371a commit 7a7a810
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,16 @@ import * as utils from '../utils';

function Template({ children, ...attrs }) {
if (typeof children !== 'string') {
children = renderToString(children)
children = renderToString(children);
}

return (
<template
{...attrs}
dangerouslySetInnerHTML={{ __html: children }}
/>
<template {...attrs} dangerouslySetInnerHTML={{ __html: children }} />
);
}

Template.propTypes = {
children: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node
])
children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
};

Template.defaultProps = { children: '' };
Expand Down

0 comments on commit 7a7a810

Please sign in to comment.