|
|
@@ -478,14 +478,19 @@ export default function DayNightCard(props: { isNight: boolean, count: number })
|
|
|
|
|
|
function getLocation() {
|
|
|
var city = ''
|
|
|
- if ((authInfo as any).address.city.length > 0) {
|
|
|
- city = (authInfo as any).address.city
|
|
|
- }
|
|
|
- else if ((authInfo as any).address.province.length > 0) {
|
|
|
- city = (authInfo as any).address.province
|
|
|
- }
|
|
|
- else if ((authInfo as any).address.country.length > 0) {
|
|
|
- city = (authInfo as any).address.country
|
|
|
+ if ((authInfo as any).address){
|
|
|
+ if ((authInfo as any).address.city.length > 0) {
|
|
|
+ city = (authInfo as any).address.city
|
|
|
+ }
|
|
|
+ else if ((authInfo as any).address.province.length > 0) {
|
|
|
+ city = (authInfo as any).address.province
|
|
|
+ }
|
|
|
+ else if ((authInfo as any).address.country.length > 0) {
|
|
|
+ city = (authInfo as any).address.country
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ city = t('feature.track_time_duration.third_ring.unknown')
|
|
|
+ }
|
|
|
}
|
|
|
else {
|
|
|
city = t('feature.track_time_duration.third_ring.unknown')
|