You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks @chambo-e for reporting this. This seems reasonable that we want to augment JSON to allow undefined properties, as we assume that users understand that any undefined values are removed on serialization.
In the meantime, you can fallback on null, as null is of course a valid JSON primitive (for anyone else who comes across this issue).
consttrackUser=({ userId, language =null}: {userId: string,language?: string|null})=>{analytics.track('User',{ userId, language })}
Hello 👋
Since #561 we are unable to pass undefined as a value to track/identify calls as JSONValue does not accept undefined values
Meaning this kind of (pseudo) function
Does not work anymore whilst it used to be a valid way to pass optional values.
Filtering undefined values can be a solution but a quite heavy one when JSON.stringify automatically strip undefined values
Could undefined be added back as a possible values to objects ?
Thanks :)
The text was updated successfully, but these errors were encountered: