Skip to content

Commit

Permalink
chore(lint): fixes lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed Sep 9, 2019
1 parent 4b14f30 commit 49c17a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/util/get-location-origin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ export function getLocationOrigin(locationLike: Location | HTMLAnchorElement = l
return locationLike.origin;
}

return `${locationLike.protocol}//${locationLike.hostname}${locationLike.port ? ":" + locationLike.port : ""}`;
return `${locationLike.protocol}//${locationLike.hostname}${
locationLike.port != null && locationLike.port.length > 0 ? ":" + locationLike.port : ""
}`;
}

0 comments on commit 49c17a4

Please sign in to comment.