Fix views crash on geoip update failure

pull/6318/head
Chocobozzz 2024-04-03 15:11:10 +02:00
parent 61fec4e4ef
commit f8b8dc674e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 2 deletions

View File

@ -25,9 +25,9 @@ export class GeoIP {
const emptyResult = { country: null, subdivisionName: null } const emptyResult = { country: null, subdivisionName: null }
if (CONFIG.GEO_IP.ENABLED === false) return emptyResult if (CONFIG.GEO_IP.ENABLED === false) return emptyResult
await this.initReadersIfNeeded()
try { try {
await this.initReadersIfNeeded()
const countryResult = this.countryReader?.get(ip) const countryResult = this.countryReader?.get(ip)
const cityResult = this.cityReader?.get(ip) const cityResult = this.cityReader?.get(ip)