Skip to content

Commit 6ebf084

Browse files
committed
Ignore error if content node is gone
1 parent 49ea8bf commit 6ebf084

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/react-dom-bindings/src/server/fizz-instruction-set/ReactDOMFizzInstructionSetInlineCodeStrings.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-dom-bindings/src/server/fizz-instruction-set/ReactDOMFizzInstructionSetShared.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ export function completeBoundary(suspenseBoundaryID, contentID, errorDigest) {
5151
const contentNode = document.getElementById(contentID);
5252
// We'll detach the content node so that regardless of what happens next we don't leave in the tree.
5353
// This might also help by not causing recalcing each time we move a child from here to the target.
54+
if (!contentNode) {
55+
return;
56+
}
5457
contentNode.parentNode.removeChild(contentNode);
5558

5659
// Find the fallback's first element.

0 commit comments

Comments
 (0)