taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 61558e00ae6ad9df601a284d99d4806002a35dad
parent 5b43bd857c6eb623ff93468046d8bc08226d9ca0
Author: Florian Dold <florian.dold@gmail.com>
Date:   Thu, 21 Nov 2019 11:52:26 +0100

fix breakage due to URI.js upgrade

Diffstat:
Msrc/helpers.ts | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/helpers.ts b/src/helpers.ts @@ -44,10 +44,10 @@ export function amountToPretty(amount: AmountJson): string { * See http://api.taler.net/wallet.html#general */ export function canonicalizeBaseUrl(url: string) { - const x = new URI(url); - if (!x.protocol()) { - x.protocol("https"); + if (!url.startsWith("http") && !url.startsWith("https")) { + url = "https://" + url; } + const x = new URI(url); x.path(x.path() + "/").normalizePath(); x.fragment(""); x.query();