Commit cf72fba6 authored by John Resig's avatar John Resig

Make sure that the defaultView exists before attempting to get at the...

Make sure that the defaultView exists before attempting to get at the computedStyle (makes it easier to hide items that don't have a view). Fixes #5619.
parent 4e9fed3b
...@@ -141,7 +141,13 @@ jQuery.extend({ ...@@ -141,7 +141,13 @@ jQuery.extend({
name = name.replace( rupper, "-$1" ).toLowerCase(); name = name.replace( rupper, "-$1" ).toLowerCase();
var computedStyle = elem.ownerDocument.defaultView.getComputedStyle( elem, null ); var defaultView = elem.ownerDocument.defaultView;
if ( !defaultView ) {
return null;
}
var computedStyle = defaultView.getComputedStyle( elem, null );
if ( computedStyle ) { if ( computedStyle ) {
ret = computedStyle.getPropertyValue( name ); ret = computedStyle.getPropertyValue( name );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment