analytics icon indicating copy to clipboard operation
analytics copied to clipboard

The code will throw the error "cannot read [0] of undefined", if endpoint.Attributes.lastPageSession is undefined

Open yuezhaoBJ opened this issue 3 years ago • 0 comments

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.

yuezhaoBJ avatar Aug 25 '22 06:08 yuezhaoBJ