summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-23 13:41:52 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-23 13:41:52 +0200
commit039ab7baef6e1b3a32bd3c4e798672f7626d7807 (patch)
treef8e9c0f89b524b9ccf5aeba454b88715b8a4b60c /src
parent12eeaf863790fe57bfbf271457735a8603011404 (diff)
downloadwallet-core-039ab7baef6e1b3a32bd3c4e798672f7626d7807.tar.gz
wallet-core-039ab7baef6e1b3a32bd3c4e798672f7626d7807.tar.bz2
wallet-core-039ab7baef6e1b3a32bd3c4e798672f7626d7807.zip
fix callBackend when response is null/undefined
Diffstat (limited to 'src')
-rw-r--r--src/wxApi.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wxApi.ts b/src/wxApi.ts
index f06ab69a7..b74cb9eb1 100644
--- 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);