From 35c314827d8b5b4eb996cf590d8254eea48a3896 Mon Sep 17 00:00:00 2001 From: Todor Prikumov Date: Tue, 26 Jan 2016 11:58:34 +0200 Subject: [PATCH] CSS: Make sure elem.ownerDocument.defaultView is not null Fixes gh-2866 Close gh-2867 --- src/css/var/getStyles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/var/getStyles.js b/src/css/var/getStyles.js index 1fa915d58..02a4b8194 100644 --- a/src/css/var/getStyles.js +++ b/src/css/var/getStyles.js @@ -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; } -- 2.39.5