fix: support navigating to other origins with `use_navigate` (#2847)

This commit is contained in:
Greg Johnston 2024-08-16 20:18:28 -04:00 committed by GitHub
parent 0793d56648
commit 47b07b0143
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -143,6 +143,11 @@ impl RouterContext {
}
};
if url.origin() != current.origin() {
window().location().set_href(path).unwrap();
return;
}
// update state signal, if necessary
if options.state != self.state.get_untracked() {
self.state.set(options.state.clone());