[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-wallet-webex] 01/04: squelch ts error
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-wallet-webex] 01/04: squelch ts error |
Date: |
Mon, 09 Apr 2018 00:43:22 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-webex.
commit 3570e36baa8e407cbfe3e729a638fd8b2d8b22d9
Author: Florian Dold <address@hidden>
AuthorDate: Mon Apr 9 00:20:46 2018 +0200
squelch ts error
---
src/webex/pages/redirect.js | 8 ++++++--
tsconfig.json | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/webex/pages/redirect.js b/src/webex/pages/redirect.js
index 5a758cce..879f5b53 100644
--- a/src/webex/pages/redirect.js
+++ b/src/webex/pages/redirect.js
@@ -7,6 +7,10 @@
* redirect to pages inside the extension that are a web-accessible resource.
*/
-
const myUrl = new URL(window.location.href);
-window.location.replace(myUrl.searchParams.get("url"));
+const redirectUrl = myUrl.searchParams.get("url");
+if (!redirectUrl) {
+ console.error("missing redirect URL");
+} else {
+ window.location.replace(redirectUrl);
+}
diff --git a/tsconfig.json b/tsconfig.json
index 819c5427..d085b722 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -66,6 +66,7 @@
"src/webex/pages/logs.tsx",
"src/webex/pages/payback.tsx",
"src/webex/pages/popup.tsx",
+ "src/webex/pages/redirect.js",
"src/webex/pages/refund.tsx",
"src/webex/pages/reset-required.tsx",
"src/webex/pages/return-coins.tsx",
--
To stop receiving notification emails like this one, please contact
address@hidden