Skip to content

Commit

Permalink
Fix: err of scraping unavailable release date
Browse files Browse the repository at this point in the history
  • Loading branch information
amasin76 committed Sep 18, 2023
1 parent 8c3e6ca commit 55a4062
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/pages/content/getProjectData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function getRemainingTime(): number {
const now = new Date();
const projectMetadata = document.querySelector("#project-metadata");
const checkerElement = findElementByText(projectMetadata, "li", "Checker");
const timeString = (checkerElement.querySelector(".datetime") as HTMLElement).innerText;
const timeString = (checkerElement?.querySelector(".datetime") as HTMLElement)?.innerText;
const releaseTime = new Date(timeString);
const remainingTimeInMs = releaseTime.getTime() - now.getTime();

Expand Down
3 changes: 0 additions & 3 deletions src/pages/popup/components/Checker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ export const Checker: React.FC = () => {
});
};

console.log(remainingTimeInMs);
console.log(hasCheckerBtn);

return (
<div className="checker">
<div className="checker--title">
Expand Down

0 comments on commit 55a4062

Please sign in to comment.