Skip to content

Commit

Permalink
feat: do not apply adoption city data if country doesn`t match
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Nov 3, 2023
1 parent c577166 commit a37ac51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/adopted-probes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class AdoptedProbes {
getUpdatedLocation (probe: Probe) {
const adoptedProbe = this.getByIp(probe.ipAddress);

if (!adoptedProbe || !adoptedProbe.isCustomCity) {
if (!adoptedProbe || !adoptedProbe.isCustomCity || adoptedProbe.country !== probe.location.country) {
return probe.location;
}

Expand Down

0 comments on commit a37ac51

Please sign in to comment.