]> source.dussan.org Git - jquery.git/commitdiff
CSS: Make sure elem.ownerDocument.defaultView is not null
authorTodor Prikumov <tono_pr@abv.bg>
Tue, 26 Jan 2016 09:58:34 +0000 (11:58 +0200)
committerTimmy Willison <timmywillisn@gmail.com>
Wed, 27 Jan 2016 16:39:24 +0000 (11:39 -0500)
Fixes gh-2866
Close gh-2867

src/css/curCSS.js

index 67fc27525031a24db5800d49d9b7488ae5a5ab8e..8a01e2f740dd9be4a9ba57213a048e69bfd40714 100644 (file)
@@ -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;
                }