Skip to content

Commit

Permalink
fix: maintain hash when setting query signal (closes #1902) (#1908)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj authored Oct 18, 2023
1 parent 7b88df3 commit 8994154
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions router/src/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ where
}
}
let qs = new_query_map.to_query_string();
let path = location.pathname.get();
let new_url = format!("{path}{qs}");
let path = location.pathname.get_untracked();
let hash = location.hash.get_untracked();
let new_url = format!("{path}{qs}{hash}");
navigate(&new_url, NavigateOptions::default());
});

Expand Down

0 comments on commit 8994154

Please sign in to comment.