Fix double navigation bug in breadcrumbs
This commit is contained in:
@@ -28,12 +28,16 @@ onMount(() => {
|
||||
nav.open_node((window as any).initial_node as FSPath, false)
|
||||
} else {
|
||||
console.debug("No initial node, fetching path", window.location.pathname)
|
||||
nav.navigate(decodeURI(window.location.pathname).replace(/^\/d/, ""), false)
|
||||
nav.navigate(decodeURIComponent(window.location.pathname).replace(/^\/d/, ""), false)
|
||||
}
|
||||
|
||||
// There is a global natigation handler which captures link clicks and loads
|
||||
// the right svelte components. When a filesystem link is clicked this store
|
||||
// is updated. Catch it and use the filesystem navigator to navigate to the
|
||||
// right file
|
||||
const page_sub = current_page_store.subscribe(() => {
|
||||
console.debug("Caught page transition to", window.location.pathname)
|
||||
nav.navigate(decodeURI(window.location.pathname).replace(/^\/d/, ""), false)
|
||||
console.debug("Caught page transition to", window.location.pathname, "calling navigator")
|
||||
nav.navigate(decodeURIComponent(window.location.pathname).replace(/^\/d/, ""), false)
|
||||
})
|
||||
|
||||
// Subscribe to navigation updates. This function returns a deconstructor
|
||||
|
||||
Reference in New Issue
Block a user