Skip to content

[pull] main from react:main - #668

Merged
pull[bot] merged 1 commit into
code:mainfrom
react:main
Sep 11, 2026
Merged

pull[bot] merged 1 commit into
code:mainfrom
react:main

Conversation

@pull

@pull pull Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

## Summary

Fixes #37578.

`FragmentInstance.compareDocumentPosition(document)` threw:

```
TypeError: Cannot read properties of null (reading 'documentElement')
```

because `Document.ownerDocument` is `null`, and the `CONTAINS`
fiber-validation fallback read `ownerDocument.documentElement`
unconditionally. `document.body` / `document.documentElement` already
worked.

This treats a `Document` node as its own owner document, matching
`Node.compareDocumentPosition(document)`.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
@pull pull Bot locked and limited conversation to collaborators Sep 11, 2026
@pull pull Bot added the ⤵️ pull label Sep 11, 2026
@pull
pull Bot merged commit 019019b into code:main Sep 11, 2026
15 checks passed

This branch had an error being deployed

1 failed deployment
npm — 019019be Deployed Sep 12, 2026 by pull[bot] via Publish release #78
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant