From 62bd692d2bed16052b19763f7c6e679aba1f0133 Mon Sep 17 00:00:00 2001 From: Vazgen Torosyan Date: Mon, 13 Mar 2017 13:01:40 +0400 Subject: [PATCH] Update morris.js --- morris.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/morris.js b/morris.js index 35ad207..2e52b3e 100644 --- a/morris.js +++ b/morris.js @@ -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) {