Skip to content

Commit

Permalink
website: strict type check
Browse files Browse the repository at this point in the history
  • Loading branch information
iorate committed Sep 22, 2024
1 parent b56d303 commit 5999e1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions website/src/pages/subscribe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}, []);
Expand Down
3 changes: 2 additions & 1 deletion website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "@docusaurus/tsconfig"
"extends": ["../tsconfig.json", "@docusaurus/tsconfig"],
"exclude": [".docusaurus", "build"]
}

0 comments on commit 5999e1b

Please sign in to comment.