Skip to content

Commit 0b7a312

Browse files
naaajiiamysorto
authored andcommitted
feat: added ability to keep pathname and hash on version change
1 parent cc7d9c2 commit 0b7a312

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/shared/version-picker/version-picker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class VersionPicker {
3737
*/
3838
onVersionChanged(version: VersionInfo) {
3939
if (!version.url.startsWith(window.location.href)) {
40-
window.location.assign(version.url);
40+
window.location.assign(window.location.pathname ? (version.url + window.location.pathname + window.location.hash) : version.url );
4141
}
4242
}
4343
}

0 commit comments

Comments
 (0)