Permalink
Browse files

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

Fixes gh-2866
Close gh-2867
  • Loading branch information...
1 parent 1de8346 commit 35c314827d8b5b4eb996cf590d8254eea48a3896 @todorpr todorpr committed with Timmy Willison Jan 26, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 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;
}

0 comments on commit 35c3148

Please sign in to comment.