From 8a5b3209f400efe1ab0d93a3d2ef9fc96f287273 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 6 Jan 2010 19:43:10 -0500 Subject: [PATCH] add check to getStyle to ensure provided element has a style attribute --- src/dom/dom.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dom/dom.js b/src/dom/dom.js index 86f3b77..7b02f64 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -1004,6 +1004,9 @@ Element.Methods = { **/ getStyle: function(element, style) { element = $(element); + if (!element.style) + return null; + style = style == 'float' ? 'cssFloat' : style.camelize(); var value = element.style[style]; if (!value || value == 'auto') {