aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/webex/pages/redirect.js8
-rw-r--r--tsconfig.json1
2 files changed, 7 insertions, 2 deletions
diff --git a/src/webex/pages/redirect.js b/src/webex/pages/redirect.js
index 5a758cce4..879f5b530 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 819c54276..d085b7220 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",