diff options
-rw-r--r-- | content_scripts/notify.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/content_scripts/notify.ts b/content_scripts/notify.ts index 63754af16..1d31c929a 100644 --- a/content_scripts/notify.ts +++ b/content_scripts/notify.ts @@ -178,14 +178,14 @@ namespace TalerNotify { } }); - console.log(resp); - if (resp.type === "fetch") { + + if (resp && resp.type === "fetch") { console.log("it's fetch"); internalOfferContractFrom(resp.contractUrl); document.documentElement.style.visibility = "hidden"; - } else if (resp.type === "execute") { + } else if (resp && resp.type === "execute") { console.log("it's execute"); document.documentElement.style.visibility = "hidden"; internalExecuteContract(resp.contractHash, resp.payUrl, resp.offerUrl); |