Skip to content

Commit 313c8c5

Browse files
authored
Fix moveBefore feature detection (#32087)
`moveBefore` was moved to the `ParentNode` mixin as per whatwg/dom#1307 (comment) _(and was committed in whatwg/dom@3f3e94c5beda922962dacaeb606087f57bd7f7be)_ As a result, its existence can no longer be checked on `Node.prototype` but must be checked in `Element.prototype`
1 parent d46b04a commit 313c8c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ const supportsMoveBefore =
780780
// $FlowFixMe[prop-missing]: We're doing the feature detection here.
781781
enableMoveBefore &&
782782
typeof window !== 'undefined' &&
783-
typeof window.Node.prototype.moveBefore === 'function';
783+
typeof window.Element.prototype.moveBefore === 'function';
784784

785785
export function appendChild(
786786
parentInstance: Instance,

0 commit comments

Comments
 (0)