Fix URL not updating when using navigateInternalOnAnchor

We were always calling `replace` and not passing the desired action in
the `navigateInternalOnAnchor`, this was leading to the URL not updating
when e.g. clicking on file URLs in Markdown renders.

By passing the action to the `navigate` fn instead we can also take the
`push` action into account.

Test have been written to guarantee this works

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez
2023-07-21 22:36:53 +02:00
parent b76db5dfa3
commit 50d046ce86
+1 -1
View File
@@ -72,7 +72,7 @@ export async function navigateToUrl(
const route = urlToRoute(url);
if (route) {
await replace(route);
await navigate(action, route);
} else {
await navigate(action, {
resource: "notFound",