Skip to content

Commit 037b514

Browse files
committed
fix: clear console on history change
1 parent cffdf82 commit 037b514

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

views/assets/js/loader.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
fetch(destination.pathname + '.ico', { mode: 'same-origin' })
3030
.then((response) => {
3131
if (destination !== location && pushState) {
32+
console.clear();
3233
if (response.status === 200) history.pushState({}, '', destination);
3334
else return location.assign(new URL(destination, location));
3435
}
@@ -194,6 +195,7 @@
194195
if (document.readyState === 'complete') loadPage()();
195196
else addEventListener('load', loadPage());
196197
addEventListener('popstate', () => {
198+
console.clear();
197199
loadPage(location, false)();
198200
});
199201
})();

0 commit comments

Comments
 (0)