Skip to content

Commit

Permalink
Fix views crash on geoip update failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Apr 3, 2024
1 parent 61fec4e commit f8b8dc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/core/helpers/geo-ip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f8b8dc6

Please sign in to comment.