dillon1000/react

Commit

Prevent errors from comment node roots with enableViewTransition (#33205)

We have many cases internally where the `containerInstance` resolves to
a comment node. `restoreRootViewTransitionName` is called when
`enableViewTransition` is on, even without introducing a
`<ViewTransition />`. So that means it can crash pages because
`containerInstance.style` is `undefined` just by turning on the flag.

This skips cancel/restore of root view transition name if a comment node is the root.
Browse files
Changed paths3 files
First-parent comparison
M packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js ModifiedM packages/react-reconciler/src/ReactFiberCommitWork.js ModifiedM scripts/error-codes/codes.json Modified
Patch

Files changed

Rendering syntax-highlighted changes…