Skip to content

Commit

Permalink
UPDATE: if clause
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremiahUy committed Nov 4, 2022
1 parent bff9e8a commit 94a45d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/routes/collect-auto.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const customHandler = function (request, reply, ingresses) {
} else {
const eventsWithProxyData = addProxyData(eventsWithClusterData, process.env.NAIS_APP_IMAGE);
let eventsWithGeoData;
if(request.api_properties && request.api_properties.ip_address) {
if(request.api_properties && request.api_properties.tracking_options && request.api_properties.ip_address) {
eventsWithGeoData = addGeoData(eventsWithProxyData, null);
} else {
eventsWithGeoData = addGeoData(eventsWithProxyData, request.ip);
Expand Down
2 changes: 1 addition & 1 deletion src/routes/collect.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const handler = function(request, reply) {
} else {
const eventsWithProxyData = addProxyData(inputEvents, process.env.NAIS_APP_IMAGE);
let eventsWithGeoData;
if(request.api_properties && !request.api_properties.ip_address) {
if(request.api_properties && request.api_properties.tracking_options && !request.api_properties.ip_address) {
eventsWithGeoData = addGeoData(eventsWithProxyData, null);
} else {
eventsWithGeoData = addGeoData(eventsWithProxyData, request.ip);
Expand Down

0 comments on commit 94a45d6

Please sign in to comment.