From 40fe301b5462b84e06747ff30add26b4259d38a4 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Tue, 10 Dec 2024 20:39:13 +0100 Subject: [PATCH] fix(navigation): not updating style and background image --- index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.ts b/index.ts index 24951c2..c3f46b0 100644 --- a/index.ts +++ b/index.ts @@ -23,10 +23,7 @@ function changePage(href: string) { const doc = new DOMParser().parseFromString(html, "text/html") window.history.pushState({}, "", href) document.title = doc.title - const distMain = doc.querySelector("main") - const currentMain = document.querySelector("main") - if (distMain === null || currentMain === null) document.body = doc.body - else currentMain.innerHTML = distMain.innerHTML + document.body = doc.body setupEvents() scrollTo({ top: 0,