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
1 changed files with 2 additions and 2 deletions

View File

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