Skip to content

Commit

Permalink
Bug fix for reused FedEx tracking numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
freshlogic committed Dec 2, 2020
1 parent 74a7aba commit 7aa0c22
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions carriers/fedEx.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@ function FedEx(options) {
return;
}

if (DELIVERED_TRACKING_STATUS_CODES.includes(e.EventType)) {
results.deliveredAt = new Date(e.Timestamp);
}

if (SHIPPED_TRACKING_STATUS_CODES.includes(e.EventType)) {
results.shippedAt = new Date(e.Timestamp);
}

const event = {
address: {
city: e.Address.City,
Expand All @@ -158,6 +150,14 @@ function FedEx(options) {
event.address.city = event.address.city.replace(CITY_BLACKLIST, '').trim();
}

if (DELIVERED_TRACKING_STATUS_CODES.includes(e.EventType)) {
results.deliveredAt = new Date(e.Timestamp);
}

if (SHIPPED_TRACKING_STATUS_CODES.includes(e.EventType)) {
results.shippedAt = new Date(e.Timestamp);
}

results.events.push(event);
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
"type": "git",
"url": "https://github.com/mediocre/bloodhound.git"
},
"version": "1.7.3"
"version": "1.7.4"
}

0 comments on commit 7aa0c22

Please sign in to comment.