JS: Backout some of latest amount parsing changes.

This commit is contained in:
Arthur Britto
2013-03-04 13:50:20 -08:00
committed by Stefan Thomas
parent 49b825293b
commit 84eee280ae

View File

@@ -613,7 +613,8 @@ Amount.prototype.parse_issuer = function (issuer) {
Amount.prototype.parse_json = function (j) { Amount.prototype.parse_json = function (j) {
if ('string' === typeof j) { if ('string' === typeof j) {
// .../.../... notation is not a wire format. But allowed for easier testing. // .../.../... notation is not a wire format. But allowed for easier testing.
var m = j.match(/^(.+)\/(...)(?:\/(.+))?$/); // var m = j.match(/^(.+)\/(...)(?:\/(.+))?$/);
var m = j.match(/^(.+)\/(...)\/(.+)$/);
if (m) { if (m) {
this._currency = Currency.from_json(m[2]); this._currency = Currency.from_json(m[2]);