Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
fix: silence errors on unknown peer geoip location
Browse files Browse the repository at this point in the history
  • Loading branch information
GitSquared committed Feb 24, 2021
1 parent 32e3290 commit 6ae97b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/classes/locationGlobe.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ class LocationGlobe {
// Connections
this.conns = [];
this.addConn = ip => {
let data = window.mods.netstat.geoLookup.get(ip);
let data = null;
try {
data = window.mods.netstat.geoLookup.get(ip);
} catch {
// do nothing
}
let geo = (data !== null ? data.location : {});
if (geo.latitude && geo.longitude) {
const lat = Number(geo.latitude);
Expand Down

0 comments on commit 6ae97b7

Please sign in to comment.