Fixing an error with a variable

This commit is contained in:
Данил 2024-07-23 17:57:46 +03:00
parent 5f1eb72303
commit 22a6437c17

View file

@ -13,7 +13,7 @@ function load(date) {
} }
function parseURL() { function parseURL() {
let pathname = '2024-01-01'; let pathname = document.location.pathname;
pathname = pathname.slice(pathname.lastIndexOf('/')+1) pathname = pathname.slice(pathname.lastIndexOf('/')+1)
if (isNaN(new Date(pathname).getTime())) return window.location.replace("./404.html"); if (isNaN(new Date(pathname).getTime())) return window.location.replace("./404.html");