-
Notifications
You must be signed in to change notification settings - Fork 197
fix: add logic to convert traits to strings #763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
(acc: Record<string, string>, trait) => { | ||
if (checkType(eventTraits[trait])) { | ||
this.analytics?.logger.warn( | ||
'We detected an object or array data type. Firebase does not accept nested traits.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alanjcharles checkType
explicitly does not guard against arrays. Should this message be 'We detected a plain object data type'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah, nice catch!
} | ||
if (event.traits) { | ||
let eventTraits = event.traits; | ||
let safeTraits: Record<string, string>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why make this a separate declaration? =)
## [@segment/analytics-react-native-plugin-firebase-v0.3.4](https://github.com/segmentio/analytics-react-native/compare/@segment/analytics-react-native-plugin-firebase-v0.3.3...@segment/analytics-react-native-plugin-firebase-v0.3.4) (2023-02-28) ### Bug Fixes * add logic to convert traits to strings ([#763](#763)) ([559a3bb](559a3bb))
No description provided.