diff --git a/website/src/pages/subscribe.tsx b/website/src/pages/subscribe.tsx index 929f89d73..6bfcf26b6 100644 --- a/website/src/pages/subscribe.tsx +++ b/website/src/pages/subscribe.tsx @@ -6,11 +6,13 @@ const Subscribe: React.FC = () => { "chrome-extension://pncfbmialoiaghdehhbnbhkkgmjanfhe/pages/options.html", ); const query = new URL(window.location.href).searchParams; - if (query.has("name")) { - optionsURL.searchParams.set("addSubscriptionName", query.get("name")); + const name = query.get("name"); + if (name != null) { + optionsURL.searchParams.set("addSubscriptionName", name); } - if (query.has("url")) { - optionsURL.searchParams.set("addSubscriptionURL", query.get("url")); + const url = query.get("url"); + if (url != null) { + optionsURL.searchParams.set("addSubscriptionURL", url); } window.location.href = optionsURL.toString(); }, []); diff --git a/website/tsconfig.json b/website/tsconfig.json index fae2c2390..5b1249385 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -1,3 +1,4 @@ { - "extends": "@docusaurus/tsconfig" + "extends": ["../tsconfig.json", "@docusaurus/tsconfig"], + "exclude": [".docusaurus", "build"] }