Skip to content

Commit

Permalink
Update events.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mpothier committed Sep 13, 2024
1 parent c25270e commit 0ee83c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ MapboxEventManager.prototype = {
proximity = [geocoder.options.proximity.longitude, geocoder.options.proximity.latitude];
} else if (geocoder.options.proximity === 'ip') {
var ipProximityHeader = geocoder._headers ? geocoder._headers['ip-proximity'] : null;
if (ipProximityHeader) {
if (ipProximityHeader && typeof ipProximityHeader === 'string') {
proximity = ipProximityHeader.split(',').map(parseFloat);
} else {
proximity = [999,999]; // Alias for 'ip' in event logs
Expand Down

0 comments on commit 0ee83c9

Please sign in to comment.