diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4e2572c..b7f0af1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,11 @@ on: push: branches: - master + - v0.4 pull_request: branches: - master + - v0.4 env: CARGO_TERM_COLOR: always diff --git a/leptos_i18n/src/routing.rs b/leptos_i18n/src/routing.rs index d5301443..ccb95ed7 100644 --- a/leptos_i18n/src/routing.rs +++ b/leptos_i18n/src/routing.rs @@ -66,10 +66,16 @@ fn get_new_path( path_builder.build() }); location.search.with_untracked(|search| { - new_path.push_str(search); + if !search.is_empty() { + new_path.push('?'); + new_path.push_str(search); + } }); location.hash.with_untracked(|hash| { - new_path.push_str(hash); + if !hash.is_empty() { + new_path.push('#'); + new_path.push_str(hash); + } }); new_path }