Skip to content

Commit

Permalink
Merge pull request floating-ui#1157 from jacwright/iframe-errors
Browse files Browse the repository at this point in the history
Fix errors when iframes are destroyed
  • Loading branch information
FezVrasta authored Jul 30, 2020
2 parents be217c6 + 9f720da commit 435cba7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dom-utils/getWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
export default function getWindow(node) {
if (node.toString() !== '[object Window]') {
const ownerDocument = node.ownerDocument;
return ownerDocument ? ownerDocument.defaultView : window;
return ownerDocument ? ownerDocument.defaultView || window : window;
}

return node;
Expand Down

0 comments on commit 435cba7

Please sign in to comment.