Fix views crash on geoip update failure

This commit is contained in:
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

View file

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