Skip to content

Commit 7e2bbed

Browse files
fix: window.location.href changed to its origin (#1234)
Co-authored-by: Amy Sorto <[email protected]>
1 parent 49cd736 commit 7e2bbed

File tree

1 file changed

+1
-1
lines changed
  • material.angular.io/material.angular.io/src/app/shared/version-picker

1 file changed

+1
-1
lines changed

material.angular.io/material.angular.io/src/app/shared/version-picker/version-picker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class VersionPicker {
3636
* @param version data for use in navigating to the version's path
3737
*/
3838
onVersionChanged(version: VersionInfo) {
39-
if (!version.url.startsWith(window.location.href)) {
39+
if (!version.url.startsWith(window.location.origin)) {
4040
window.location.assign(
4141
window.location.pathname ?
4242
(version.url + window.location.pathname + window.location.hash)

0 commit comments

Comments
 (0)