Changed the path to the 404 error

This commit is contained in:
Данил 2024-07-29 11:22:21 +03:00
parent ee295c545e
commit 799b1c499c

View file

@ -16,8 +16,8 @@ function parseURL() {
let pathname = document.location.pathname;
pathname = pathname.slice(pathname.lastIndexOf('/')+1)
if (isNaN(new Date(pathname).getTime())) return window.location.replace("./404.html");
if (!isValidDate(pathname)) return window.location.replace("./404.html");
if (isNaN(new Date(pathname).getTime())) return window.location.replace("../404.html");
if (!isValidDate(pathname)) return window.location.replace("../404.html");
return pathname;
}