Added a check to make sure that .style exists before trying to access it (Bug #2105).

This commit is contained in:
John Resig 2008-01-14 19:17:35 +00:00
parent 047debc750
commit 6e739fd2ba

View file

@ -836,7 +836,7 @@ jQuery.extend({
if ( name.match( /float/i ) )
name = styleFloat;
if ( !force && elem.style[ name ] )
if ( !force && elem.style && elem.style[ name ] )
ret = elem.style[ name ];
else if ( document.defaultView && document.defaultView.getComputedStyle ) {