Skip to content

Commit 987e85e

Browse files
committed
Prevent comment node roots from erroring when enableViewTransition=true
1 parent d85f86c commit 987e85e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,8 +1593,10 @@ export function restoreRootViewTransitionName(rootContainer: Container): void {
15931593
// clone the whole document outside of the React too.
15941594
containerInstance = (rootContainer: any);
15951595
}
1596-
// $FlowFixMe[prop-missing]
1597-
if (containerInstance.style.viewTransitionName === 'root') {
1596+
if (
1597+
containerInstance.style &&
1598+
containerInstance.style.viewTransitionName === 'root'
1599+
) {
15981600
// If we moved the root view transition name to the container in a gesture
15991601
// we need to restore it now.
16001602
containerInstance.style.viewTransitionName = '';

0 commit comments

Comments
 (0)