mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
2ca4fae6b8
While modern DOM implementations all support getRootNode if you are
running React in a runtime which does not the fallback logic which uses
`.ownerDocument` works everywhere except when the container is a
Document itself. This change corrects this by returning the container
intsance if it is a Document type.
DiffTrain build for [b48e739998](https://github.com/facebook/react/commit/b48e739998432fc9672a42d0d04515980b8cae82)