Skip to content

Commit ee5be5b

Browse files
committed
cleanup getOrigin
1 parent 06a2e25 commit ee5be5b

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

packages/@ember/routing/lib/location-utils.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,12 @@ export function getFullPath(location: Location): string {
3838
return getPath(location) + getQuery(location) + getHash(location);
3939
}
4040

41-
export function getOrigin(location: Location): string {
42-
return location.origin;
43-
}
44-
4541
/**
4642
Replaces the current location, making sure we explicitly include the origin
4743
to prevent redirecting to a different origin.
4844
4945
@private
5046
*/
5147
export function replacePath(location: Location, path: string): void {
52-
location.replace(getOrigin(location) + path);
48+
location.replace(location.origin + path);
5349
}

0 commit comments

Comments
 (0)