From d9f8ffc85f78a168ce77ff6e24fd80fbc0a93d35 Mon Sep 17 00:00:00 2001 From: metacryst Date: Tue, 5 Dec 2023 13:28:20 -0600 Subject: [PATCH] Fixing bug with otherly-named htmls --- index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.js b/index.js index 1ffc474..f576446 100644 --- a/index.js +++ b/index.js @@ -71,10 +71,8 @@ Object.defineProperty(window, 'routes', { }); function locationChange() { console.log("location change") - let URL = window.location.pathname.split("/").filter(d => (d !== 'Web') && (d !== 'index.html')).join("/") + let URL = window.location.pathname.split("/").filter(d => (d !== 'Web') && (!d.includes('.html'))).join("/") if(URL === "") URL = "/" - console.log(URL) - console.log(document.body.children[0]) let wrapper = document.querySelector("#wrapper"); if(wrapper) { wrapper.replaceWith(new window.routes[URL]())