fix: exchange location order

This commit is contained in:
Innei
2022-05-03 14:44:09 +08:00
parent 8acb7fdd45
commit 454159e88f

View File

@@ -133,11 +133,11 @@ export class CommentController {
.getIp(ipLocation.ip)
.then(
(res) =>
`${res.cityName ? `${res.cityName}` : ''}${
`${
res.regionName && res.regionName !== res.cityName
? `-${res.regionName}`
? `${res.regionName}`
: ''
}` || undefined,
}${res.cityName ? `${res.cityName}` : ''}` || undefined,
)
.catch(() => undefined)
}