mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
parent
18bc03e660
commit
651868dec9
2 changed files with 9 additions and 4 deletions
|
@ -278,9 +278,12 @@ impl RouterContextInner {
|
|||
let global_suspense =
|
||||
expect_context::<GlobalSuspenseContext>(cx);
|
||||
let path_stack = self.path_stack;
|
||||
path_stack.update_value(|stack| {
|
||||
stack.push(resolved_to.clone())
|
||||
});
|
||||
let is_navigating_back = self.is_back.get_untracked();
|
||||
if !is_navigating_back {
|
||||
path_stack.update_value(|stack| {
|
||||
stack.push(resolved_to.clone())
|
||||
});
|
||||
}
|
||||
|
||||
let set_is_routing = use_context::<SetIsRouting>(cx);
|
||||
if let Some(set_is_routing) = set_is_routing {
|
||||
|
|
|
@ -64,7 +64,9 @@ impl History for BrowserIntegration {
|
|||
|
||||
let is_navigating_back = path_stack.with_value(|stack| {
|
||||
stack.len() == 1
|
||||
|| stack.get(stack.len() - 2) == Some(&change.value)
|
||||
|| (stack.len() >= 2
|
||||
&& stack.get(stack.len() - 2)
|
||||
== Some(&change.value))
|
||||
});
|
||||
if is_navigating_back {
|
||||
path_stack.update_value(|stack| {
|
||||
|
|
Loading…
Reference in a new issue