File tree Expand file tree Collapse file tree
packages/react-dom-bindings/src
server/fizz-instruction-set Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -537,7 +537,8 @@ export function retryIfBlockedOn(
537537
538538 if ( enableFormActions ) {
539539 // Check the document if there are any queued form actions.
540- const root = unblocked === document ? unblocked : unblocked . ownerDocument ;
540+ // If there's no ownerDocument, then this is the document.
541+ const root = unblocked . ownerDocument || unblocked ;
541542 const formReplayingQueue : void | FormReplayingQueue = ( root : any )
542543 . $$reactFormReplay ;
543544 if ( formReplayingQueue != null ) {
Original file line number Diff line number Diff line change @@ -196,7 +196,8 @@ export function listenToFormSubmissionsForReplaying() {
196196 // javascript: URL placeholder value. So we might not be the first to declare it.
197197 // We attach it to the form's root node, which is the shared environment context
198198 // where we preserve sequencing and where we'll pick it up from during hydration.
199- const root = form === document ? form : form . ownerDocument ;
199+ // If there's no ownerDocument, then this is the document.
200+ const root = form . ownerDocument || form ;
200201 ( root [ '$$reactFormReplay' ] = root [ '$$reactFormReplay' ] || [ ] ) . push (
201202 form ,
202203 submitter ,
You can’t perform that action at this time.
0 commit comments