squelch ts error

This commit is contained in:
Florian Dold 2018-04-09 00:20:46 +02:00
parent c1b11a6668
commit 3570e36baa
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 7 additions and 2 deletions

View File

@ -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);
}

View File

@ -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",