From 2997bde36233911b6d549484390a2439fd329347 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 17 Dec 2012 17:33:02 -0800 Subject: [PATCH] JS: Fix amount parsing to accept negative exponents. --- src/js/amount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/amount.js b/src/js/amount.js index 84e3716c77..97b019002d 100644 --- a/src/js/amount.js +++ b/src/js/amount.js @@ -1025,7 +1025,7 @@ Amount.prototype.parse_value = function (j) { else if ('string' === typeof j) { var i = j.match(/^(-?)(\d+)$/); var d = !i && j.match(/^(-?)(\d+)\.(\d*)$/); - var e = !e && j.match(/^(-?)(\d+)e(\d+)$/); + var e = !e && j.match(/^(-?)(\d+)e(-?\d+)$/); if (e) { // e notation