Skip to content

Commit

Permalink
Experiment part 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
finnbear committed Sep 12, 2024
1 parent 9e0cc35 commit 7f8cf94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/yew-router/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fn base_router(props: &RouterProps) -> Html {

let navigator = Navigator::new(history.clone(), basename.clone());

if false && basename != *old_basename {
if basename != *old_basename {
// If `old_basename` is `Some`, path is probably prefixed with `old_basename`.
// If `old_basename` is `None`, path may or may not be prefixed with the new `basename`,
// depending on whether this is the first render.
Expand All @@ -96,7 +96,7 @@ fn base_router(props: &RouterProps) -> Html {
let location = history.location();
let stripped = old_navigator.strip_basename(Cow::Borrowed(location.path()));
let prefixed = navigator.prefix_basename(&stripped);
if prefixed != location.path() {
if false && prefixed != location.path() {
// Won't fail because `Raw::to_query` is infallible.
history
.replace_with_query(prefixed, Raw(location.query_str()))
Expand Down

0 comments on commit 7f8cf94

Please sign in to comment.