From bf0eb143a6ccb4a5fe17147b90e7ce9380ea87c1 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 14 Mar 2014 14:01:59 +0900 Subject: [PATCH] =?UTF-8?q?number=5Fformat=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EB=B6=80=ED=98=B8=20=EC=B2=98=EB=A6=AC=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=952?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/common.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/common.js b/js/common.js index c5df66328..5848854a0 100644 --- a/js/common.js +++ b/js/common.js @@ -71,7 +71,7 @@ function number_format(data) var i; var sign = data.match(/^[\+\-]/); - if(sign.length) { + if(sign) { data = data.replace(/^[\+\-]/, ""); } @@ -93,7 +93,10 @@ function number_format(data) } } - return sign[0]+number; + if(sign != null) + number = sign+number; + + return number; } // 새 창