From f9acc95d7ecaf607b8d89a486a5c68c1d7457474 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Tue, 2 Aug 2022 00:15:57 -0700 Subject: [PATCH] Simplify string --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index ba983e4..85b95b0 100644 --- a/script.js +++ b/script.js @@ -170,7 +170,7 @@ async function showPage(path) { // MUST redirect to a page where the web server serves an actual 404 error (i.e. not just // index.html again) otherwise this triggers an infinite loop document.title = '404: Not Found'; - location.replace(`${location.protocol}//${location.host}/errors/NotFound`); + location.replace(`${location.origin}/errors/NotFound`); } } -- 2.47.3