CSS: Make sure elem.ownerDocument.defaultView is not null

Fixes gh-2866
Close gh-2867
This commit is contained in:
Todor Prikumov 2016-01-26 11:58:34 +02:00 committed by Timmy Willison
parent c4d9eac930
commit 182294539e

View File

@ -6,7 +6,7 @@ define( function() {
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
var view = elem.ownerDocument.defaultView;
if ( !view.opener ) {
if ( !view || !view.opener ) {
view = window;
}