fix code navigation
This commit is contained in:
		@@ -23,18 +23,7 @@ export function handleClickableElements(clickableElements, store, router, baseUr
 | 
			
		||||
        link.onclick = async function (e) {
 | 
			
		||||
            router.push(href);
 | 
			
		||||
            if (href !== window.location.pathname) {
 | 
			
		||||
                if (href === '/') {
 | 
			
		||||
                    store.resetStore(true);
 | 
			
		||||
                    document.title = siteName;
 | 
			
		||||
                    mapStore.resetMap();
 | 
			
		||||
                } else {
 | 
			
		||||
                    await store.fetchContentData(baseUrl + href);
 | 
			
		||||
                    document.title = store.pageTitle;
 | 
			
		||||
                }
 | 
			
		||||
                setActiveNavItem(store.contentType, href);
 | 
			
		||||
 | 
			
		||||
                const listeEtape = document.querySelector('#etapes-liste');
 | 
			
		||||
                if (!useLayoutStore().isDesktop) useLayoutStore().collapseEtapeListe(listeEtape);
 | 
			
		||||
              pageChange(href, store, siteName, mapStore, baseUrl);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@@ -46,7 +35,7 @@ export async function handleBrowserNavigation(store, baseUrl, siteName, mapStore
 | 
			
		||||
  pageChange(href, store, siteName, mapStore, baseUrl)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
async function pageChange(href, store, siteName, mapStore, baseUrl ) {
 | 
			
		||||
async function pageChange(href, store, siteName, mapStore, baseUrl) {
 | 
			
		||||
  if (href === '/') {
 | 
			
		||||
      store.resetStore(true);
 | 
			
		||||
      document.title = siteName;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user