diff --git a/router/src/components/router.rs b/router/src/components/router.rs index 821bf9cbb..58e4e1f50 100644 --- a/router/src/components/router.rs +++ b/router/src/components/router.rs @@ -64,7 +64,6 @@ impl std::fmt::Debug for RouterContextInner { f.debug_struct("RouterContextInner") .field("location", &self.location) .field("base", &self.base) - .field("history", &std::any::type_name_of_val(&self.history)) .field("cx", &self.cx) .field("reference", &self.reference) .field("set_reference", &self.set_reference) @@ -99,13 +98,15 @@ impl RouterContext { let base = base.unwrap_or_default(); let base_path = resolve_path("", base, None); - if let Some(base_path) = &base_path && source.with(|s| s.value.is_empty()) { - history.navigate(&LocationChange { - value: base_path.to_string(), - replace: true, - scroll: false, - state: State(None) - }); + if let Some(base_path) = &base_path { + if source.with(|s| s.value.is_empty()) { + history.navigate(&LocationChange { + value: base_path.to_string(), + replace: true, + scroll: false, + state: State(None) + }); + } } // the current URL