Skip to content

Commit

Permalink
replace variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sayan-rudder committed Feb 17, 2020
1 parent 9dd15ea commit d18a7f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function getRevenue(properties, eventName) {
var orderCompletedRegExp = /^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i;

// it's always revenue, unless it's called during an order completion.
if (!revenue && event && eventName.match(orderCompletedRegExp)) {
if (!revenue && eventName && eventName.match(orderCompletedRegExp)) {
revenue = properties.total;
}

Expand Down

0 comments on commit d18a7f0

Please sign in to comment.