diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-04-09 00:20:46 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-04-09 00:20:46 +0200 |
commit | 3570e36baa8e407cbfe3e729a638fd8b2d8b22d9 (patch) | |
tree | 236af078c2908531f17d0dcde7e61bbd82beb232 /src | |
parent | c1b11a66686658ff93f5a0a5c52f4c48127e524b (diff) |
squelch ts error
Diffstat (limited to 'src')
-rw-r--r-- | src/webex/pages/redirect.js | 8 |
1 files changed, 6 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); +} |