JS: Reapply parsing change for json format with optional issuer.

This commit is contained in:
Stefan Thomas
2013-03-05 13:44:52 +01:00
parent 84eee280ae
commit f9a34f8404

View File

@@ -613,8 +613,7 @@ Amount.prototype.parse_issuer = function (issuer) {
Amount.prototype.parse_json = function (j) {
if ('string' === typeof j) {
// .../.../... 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) {
this._currency = Currency.from_json(m[2]);