mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
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:
+1
-1
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user