Skip to content

Commit

Permalink
Получше реализация PropertyDescriptor.toStringValue
Browse files Browse the repository at this point in the history
  • Loading branch information
ColCh committed Feb 3, 2014
1 parent 4878c39 commit e64a8ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/abstractions.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@
*/
PropertyDescriptor.prototype.toStringValue = function (elem, numericValue) {

if (numericValue.length === 0) {
if (numericValue.length === 1) {
return numericValue[0] + ( this.propName in toStringValueNoPX ? '' : 'px' );
} else if (numericValue.length === 0) {
return '';
} else {
return numericValue + ( this.propName in toStringValueNoPX ? '' : 'px' );
}
} // else ?

};

Expand Down

0 comments on commit e64a8ba

Please sign in to comment.