Skip to content

Commit

Permalink
fix(View): wrap portal in fragment (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Oct 4, 2022
1 parent 1e1801b commit 161c486
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/web/View.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ export const View = ({ track, index = 1, frames = Infinity, children }: ViewProp
}, [])

return (
ready &&
createPortal(
<Container canvasSize={size} frames={frames} scene={scene} track={track} rect={rect} index={index}>
{children}
</Container>,
virtualScene,
{ events: { compute, priority: index }, size: { width: rect.current.width, height: rect.current.height } }
)
<>
{ready &&
createPortal(
<Container canvasSize={size} frames={frames} scene={scene} track={track} rect={rect} index={index}>
{children}
</Container>,
virtualScene,
{ events: { compute, priority: index }, size: { width: rect.current.width, height: rect.current.height } }
)}
</>
)
}

1 comment on commit 161c486

@vercel
Copy link

@vercel vercel bot commented on 161c486 Oct 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.