Skip to content

Commit

Permalink
get rid of useless for..in loop in getStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
gonchuki committed Aug 20, 2012
1 parent 1f73ef0 commit cb327bf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Source/Element/Element.Style.js
Expand Up @@ -114,10 +114,9 @@ Element.implement({
property = (property == 'float' ? floatName : property).camelCase();
var result = this.style[property];
if (!result || property == 'zIndex'){
result = [];
for (var style in Element.ShortStyles){
if (property != style) continue;
for (var s in Element.ShortStyles[style]) result.push(this.getStyle(s));
if (Element.ShortStyles.hasOwnProperty(property)){
result = [];
for (var s in Element.ShortStyles[property]) result.push(this.getStyle(s));
return result.join(' ');
}
result = this.getComputedStyle(property);
Expand Down

0 comments on commit cb327bf

Please sign in to comment.