analytics
analytics copied to clipboard
The code will throw the error "cannot read [0] of undefined", if endpoint.Attributes.lastPageSession is undefined
https://github.com/DavidWells/analytics/blob/5eba4d0fca9fd2c6cef3663d2b04b2f31856d16d/packages/analytics-plugin-aws-pinpoint/src/pinpoint/helpers/merge-endpoint-data.js#L177
Seems we need to confirm endpoint.Attributes.lastPageSession is not undefined before getting the first item.