Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ export function appendChild(
parentInstance: Instance,
child: Instance | TextInstance,
): void {
if (supportsMoveBefore) {
if (supportsMoveBefore && child.parentNode !== null) {
// $FlowFixMe[prop-missing]: We've checked this with supportsMoveBefore.
parentInstance.moveBefore(child, null);
} else {
Expand All @@ -828,7 +828,7 @@ export function appendChildToContainer(
container.nodeType === COMMENT_NODE
) {
parentNode = (container.parentNode: any);
if (supportsMoveBefore) {
if (supportsMoveBefore && child.parentNode !== null) {
// $FlowFixMe[prop-missing]: We've checked this with supportsMoveBefore.
parentNode.moveBefore(child, container);
} else {
Expand All @@ -840,7 +840,7 @@ export function appendChildToContainer(
} else {
parentNode = (container: any);
}
if (supportsMoveBefore) {
if (supportsMoveBefore && child.parentNode !== null) {
// $FlowFixMe[prop-missing]: We've checked this with supportsMoveBefore.
parentNode.moveBefore(child, null);
} else {
Expand Down Expand Up @@ -870,7 +870,7 @@ export function insertBefore(
child: Instance | TextInstance,
beforeChild: Instance | TextInstance | SuspenseInstance,
): void {
if (supportsMoveBefore) {
if (supportsMoveBefore && child.parentNode !== null) {
// $FlowFixMe[prop-missing]: We've checked this with supportsMoveBefore.
parentInstance.moveBefore(child, beforeChild);
} else {
Expand All @@ -896,7 +896,7 @@ export function insertInContainerBefore(
} else {
parentNode = (container: any);
}
if (supportsMoveBefore) {
if (supportsMoveBefore && child.parentNode !== null) {
// $FlowFixMe[prop-missing]: We've checked this with supportsMoveBefore.
parentNode.moveBefore(child, beforeChild);
} else {
Expand Down
Loading