Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonrobot committed Nov 19, 2024
1 parent 3aa8bb5 commit 4761252
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/react-live/src/components/Live/LivePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ function LivePreview({ Component = "div", ...rest }: Props): JSX.Element {
const { element: Element, onError, newCode } = useContext(LiveContext);

return (
<ErrorBoundary
key={newCode}
onError={(err) => {
onError(err);
}}
>
<ErrorBoundary key={newCode} onError={onError}>
<Component {...rest}>{Element ? <Element /> : null}</Component>
</ErrorBoundary>
);
Expand Down

0 comments on commit 4761252

Please sign in to comment.