fix: history.pushState before router
This commit is contained in:
@ -36,11 +36,12 @@ const getParams = match => {
|
||||
};
|
||||
|
||||
const navigateTo = async (uri) => {
|
||||
if (await router(uri) !== 0)
|
||||
return;
|
||||
|
||||
history.pushState(null, null, uri);
|
||||
|
||||
if (await router(uri) !== 0)
|
||||
return;
|
||||
|
||||
let link = document.querySelector('a[href=\'' + location.pathname + '\']');
|
||||
if (link) {
|
||||
document.querySelector('[data-link].active')?.classList.remove('active');
|
||||
|
Reference in New Issue
Block a user