add check to getStyle to ensure provided element has a style attribute
This commit is contained in:
parent
5992866e46
commit
8a5b3209f4
@ -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') {
|
||||
|
Loading…
Reference in New Issue
Block a user