0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed member's location sometimes showing as ", US"

no issue

- geolocation.region is not always available but we had assumed it was. Adjusted the logic to only show "region, US" if region is available
This commit is contained in:
Kevin Ansfield 2020-10-22 09:15:03 +01:00
parent 5ae27247f7
commit f1bab33296

View file

@ -22,7 +22,7 @@
<LinkTo @route="member" @model={{@member}} title="Member details" class="gh-list-data gh-members-list-geolocation gh-list-cellwidth-20 middarkgrey f8 {{if (not @member.name) "gh-members-geolocation-noname"}}"> <LinkTo @route="member" @model={{@member}} title="Member details" class="gh-list-data gh-members-list-geolocation gh-list-cellwidth-20 middarkgrey f8 {{if (not @member.name) "gh-members-geolocation-noname"}}">
{{#if (and @member.geolocation @member.geolocation.country)}} {{#if (and @member.geolocation @member.geolocation.country)}}
{{#if (eq @member.geolocation.country_code "US")}} {{#if (and (eq @member.geolocation.country_code "US") @member.geolocation.region)}}
{{@member.geolocation.region}}, US {{@member.geolocation.region}}, US
{{else}} {{else}}
{{@member.geolocation.country}} {{@member.geolocation.country}}