facebookincubator/ConversionsAPI-Tag-for-GoogleTagManager

BUG: You need to check for user_data.address before accessing its properties

sahava opened this issue · 1 comments

If user_data.address doesn't exist in the eventModel, then this line (and all subsequent attempts to access user_data.address will throw an error):

(eventModel.user_data != null ? hashFunction(eventModel.user_data.address.first_name) : null);

So it should be something like:

(event_model.user_data != null && event_model.user_data.address != null ? ...

PR here: #6