aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-11-06 15:49:45 -0500
committerDave Methvin <dave.methvin@gmail.com>2011-11-06 15:49:45 -0500
commit262c32a70e1f14e5addd263af2f868525aab03c8 (patch)
tree41afd97437903e2c38e0361539c32030baeef4f2
parentf35ba5e699c15a1987baa389dbd4fc99f7a7eb03 (diff)
downloadjquery-262c32a70e1f14e5addd263af2f868525aab03c8.tar.gz
jquery-262c32a70e1f14e5addd263af2f868525aab03c8.zip
Streamline getComputedStyle per @JustinDrake's observation.
-rw-r--r--src/css.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/css.js b/src/css.js
index 3e14e1be3..988a274f6 100644
--- a/src/css.js
+++ b/src/css.js
@@ -268,11 +268,8 @@ if ( document.defaultView && document.defaultView.getComputedStyle ) {
name = name.replace( rupper, "-$1" ).toLowerCase();
- if ( !(defaultView = elem.ownerDocument.defaultView) ) {
- return undefined;
- }
-
- if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+ if ( (defaultView = elem.ownerDocument.defaultView) &&
+ (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
ret = computedStyle.getPropertyValue( name );
if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
ret = jQuery.style( elem, name );