Skip to content

Commit

Permalink
Fix double .update() call on mount
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed Oct 31, 2024
1 parent c02ec5a commit 1e7f9df
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export function useVisualElement<Instance, RenderState>(
}

useInsertionEffect(() => {
visualElement && visualElement.update(props, presenceContext)
if (visualElement && visualElement.current) {
visualElement && visualElement.update(props, presenceContext)
}
})

/**
Expand Down

0 comments on commit 1e7f9df

Please sign in to comment.