From f8b8dc674e9aec5a8b91357304541fc511284700 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Apr 2024 15:11:10 +0200 Subject: [PATCH] Fix views crash on geoip update failure --- server/core/helpers/geo-ip.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/core/helpers/geo-ip.ts b/server/core/helpers/geo-ip.ts index 0568a6893..e68321b9d 100644 --- a/server/core/helpers/geo-ip.ts +++ b/server/core/helpers/geo-ip.ts @@ -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)