mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
JS: Fix amount parsing to accept negative exponents.
This commit is contained in:
committed by
Stefan Thomas
parent
2baccc4800
commit
81882bd1fa
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user