From ab5992e56e5ea645c703343a4bba5f71e27aaf43 Mon Sep 17 00:00:00 2001 From: Todor Prikumov Date: Tue, 26 Jan 2016 11:58:34 +0200 Subject: CSS: Make sure elem.ownerDocument.defaultView is not null Fixes gh-2866 Close gh-2867 --- src/css/curCSS.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/curCSS.js b/src/css/curCSS.js index 67fc27525..8a01e2f74 100644 --- a/src/css/curCSS.js +++ b/src/css/curCSS.js @@ -19,7 +19,7 @@ if ( window.getComputedStyle ) { // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" var view = elem.ownerDocument.defaultView; - if ( !view.opener ) { + if ( !view || !view.opener ) { view = window; } -- cgit v1.2.3