diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-04-07 13:58:55 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-04-07 13:58:55 +0530 |
commit | faba5e9db8e0d1fdc4845de6b504b4e2ea3ca72b (patch) | |
tree | 53bbc26d9e5d16e168e682ce808461a395e00f45 /src/util | |
parent | fb2e2f89935240666de66e4b2c11125cb3b2943d (diff) |
finally make linter happy
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/codec-test.ts | 2 | ||||
-rw-r--r-- | src/util/query.ts | 6 | ||||
-rw-r--r-- | src/util/taleruri.ts | 5 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/util/codec-test.ts b/src/util/codec-test.ts index e25a9d3cd..b429c318c 100644 --- a/src/util/codec-test.ts +++ b/src/util/codec-test.ts @@ -51,7 +51,7 @@ test("basic codec", (t) => { t.assert(res.foo === "hello"); t.throws(() => { - const res2 = myObjCodec.decode({ foo: 123 }); + myObjCodec.decode({ foo: 123 }); }); }); diff --git a/src/util/query.ts b/src/util/query.ts index 8dd3ff1e2..401d22e71 100644 --- a/src/util/query.ts +++ b/src/util/query.ts @@ -431,7 +431,11 @@ export function openDatabase( }; req.onupgradeneeded = (e) => { const db = req.result; - onUpgradeNeeded(db, e.oldVersion, e.newVersion!); + const newVersion = e.newVersion; + if (!newVersion) { + throw Error("upgrade needed, but new version unknown"); + } + onUpgradeNeeded(db, e.oldVersion, newVersion); console.log( `DB: upgrade needed: oldVersion=${e.oldVersion}, newVersion=${e.newVersion}`, ); diff --git a/src/util/taleruri.ts b/src/util/taleruri.ts index 46cc199f8..2eaea2846 100644 --- a/src/util/taleruri.ts +++ b/src/util/taleruri.ts @@ -97,7 +97,10 @@ export function classifyTalerUri(s: string): TalerUriType { return TalerUriType.Unknown; } -export function getOrderDownloadUrl(merchantBaseUrl: string, orderId: string): string { +export function getOrderDownloadUrl( + merchantBaseUrl: string, + orderId: string, +): string { const u = new URL("proposal", merchantBaseUrl); u.searchParams.set("order_id", orderId); return u.href; |