From f9a34f8404d7ad3f409189164ab94b6eb88b44c1 Mon Sep 17 00:00:00 2001 From: Stefan Thomas Date: Tue, 5 Mar 2013 13:44:52 +0100 Subject: [PATCH] JS: Reapply parsing change for json format with optional issuer. --- src/js/amount.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/js/amount.js b/src/js/amount.js index da2e289c..5a121d4f 100644 --- a/src/js/amount.js +++ b/src/js/amount.js @@ -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]);