diff options
| author | Florian Dold <florian.dold@gmail.com> | 2015-12-18 13:46:40 +0100 |
|---|---|---|
| committer | Florian Dold <florian.dold@gmail.com> | 2015-12-18 13:46:40 +0100 |
| commit | c03100cc0d79f3b8504c6f41c32edcfdf5d17e57 (patch) | |
| tree | 6b855037cebd261c81c69681d6a9eaedc35cb528 /extension/background/wallet.ts | |
| parent | bc05121da2178cb1347c6564fb582b7cf82d9cd1 (diff) | |
error message
Diffstat (limited to 'extension/background/wallet.ts')
| -rw-r--r-- | extension/background/wallet.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extension/background/wallet.ts b/extension/background/wallet.ts index 7fee5490e..ee406d2ed 100644 --- a/extension/background/wallet.ts +++ b/extension/background/wallet.ts @@ -157,6 +157,9 @@ function getPossibleMintCoins(db: IDBDatabase, .get(info.master_pub); req_mints.onsuccess = (e) => { let mint: Db.Mint = req_mints.result; + if (!mint) { + throw Error("no matching mint in index"); + } let req_coins = tx.objectStore("coins") .index("mintBaseUrl") .openCursor(IDBKeyRange.only(mint.baseUrl)); |
