taler-typescript-core

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

commit 039ab7baef6e1b3a32bd3c4e798672f7626d7807
parent 12eeaf863790fe57bfbf271457735a8603011404
Author: Florian Dold <florian.dold@gmail.com>
Date:   Tue, 23 May 2017 13:41:52 +0200

fix callBackend when response is null/undefined

Diffstat:
Msrc/wxApi.ts | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wxApi.ts b/src/wxApi.ts @@ -50,7 +50,7 @@ export function getReserveCreationInfo(baseUrl: string, export async function callBackend(type: string, detail?: any): Promise<any> { return new Promise<any>((resolve, reject) => { chrome.runtime.sendMessage({ type, detail }, (resp) => { - if (resp.error) { + if (resp && resp.error) { reject(resp); } else { resolve(resp);