diff --git a/packages/perseus/src/locale_detector.rs b/packages/perseus/src/locale_detector.rs index 15841f9d12..5461943e0a 100644 --- a/packages/perseus/src/locale_detector.rs +++ b/packages/perseus/src/locale_detector.rs @@ -41,7 +41,7 @@ pub fn detect_locale(url: String, locales: Locales) { web_sys::window() .unwrap() .location() - .set_href(&format!("/{}/{}", locale, url)) + .replace(&format!("/{}/{}", locale, url)) .unwrap(); }