Closed efstathiosntonas closed 1 month ago
downgrading to 2.19.5
works fine.
hi @efstathiosntonas thanks for reporting this. can you please provide the line where segmentClient.track/screen/etc being called? looks like the new optional parameter enrichment
causes confusion. will send a fix.
Hi @wenxi-zeng, these are the calls to track:
const { track } = useAnalytics();
track('User XXX_1', {
status: status.trim()
}).catch();
track('User XXX_2').catch();
@efstathiosntonas please try the latest version 2.20.1
.
we couldn't reproduce the issue on our end though. it looks like the closure lost context somewhere and was treated as a normal object. but we did able to force the issue to happen if we pass an any
object to it. the fix add a safe check on whether the closure is a function. let us know if your issue still persists.
analytics-react-native
version: 2.20.0Steps to reproduce
Expected behavior
Actual behavior
After upgrading to 2.20.0 I get this crash:
Object is not a function
node_modules/@segment/analytics-react-native/src/timeline.ts:79:42
:my setup:
InjectTraits.ts
index.js