Update morris.js

This commit is contained in:
Vazgen Torosyan 2017-03-13 13:01:40 +04:00 committed by GitHub
parent 14530d0733
commit 62bd692d2b

View file

@ -50,7 +50,8 @@ Licensed under the BSD-2-Clause License.
})();
Morris.commas = function(num) {
var absnum, intnum, ret, strabsnum;
var ret='-';
var absnum, intnum, strabsnum;
if (num != null) {
ret = num < 0 ? "-" : "";
absnum = Math.abs(num);
@ -59,11 +60,8 @@ Licensed under the BSD-2-Clause License.
strabsnum = absnum.toString();
if (strabsnum.length > intnum.length) {
ret += strabsnum.slice(intnum.length);
}
return ret;
} else {
return '-';
}
}
return ret;
};
Morris.pad2 = function(number) {