File tree 2 files changed +4
-2
lines changed
packages/react-dom-bindings/src
server/fizz-instruction-set 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -537,7 +537,8 @@ export function retryIfBlockedOn(
537
537
538
538
if ( enableFormActions ) {
539
539
// 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 ;
541
542
const formReplayingQueue : void | FormReplayingQueue = ( root : any )
542
543
. $$reactFormReplay ;
543
544
if ( formReplayingQueue != null ) {
Original file line number Diff line number Diff line change @@ -196,7 +196,8 @@ export function listenToFormSubmissionsForReplaying() {
196
196
// javascript: URL placeholder value. So we might not be the first to declare it.
197
197
// We attach it to the form's root node, which is the shared environment context
198
198
// 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 ;
200
201
( root [ '$$reactFormReplay' ] = root [ '$$reactFormReplay' ] || [ ] ) . push (
201
202
form ,
202
203
submitter ,
You can’t perform that action at this time.
0 commit comments