[ftr#905] Fix crash when ownerDocument is null#912
Conversation
🦋 Changeset detectedLatest commit: b988c11 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportBase: 97.83% // Head: 97.87% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #912 +/- ##
==========================================
+ Coverage 97.83% 97.87% +0.03%
==========================================
Files 1 1
Lines 231 235 +4
Branches 111 113 +2
==========================================
+ Hits 226 230 +4
Misses 5 5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Fixes #905 There's a corner case where a node's `ownerDocument` could be null if that node is itself the `document`, which could happen under special circumstances.
847811f to
868b100
Compare
bffbfb4 to
07925b7
Compare
|
Fix confirmed, OK to merge. |
Fixes focus-trap/focus-trap-react#905
There's a corner case where a node's
ownerDocumentcould be null ifthat node is itself the
document, which could happen under specialcircumstances.
PR Checklist
Please leave this checklist in your PR.
typeof document/window !== 'undefined'before using it in code that gets executed on load.yarn changesetlocally to add one, and follow the prompts).