Skip to content

Track() event with a float data type will automatically round the numbers on Android #191

@hoangdev01

Description

@hoangdev01

Thanks guys for your work. I've found a bug and I hope you can help me.
The channelIO track() event with a float data type will automatically round the numbers on Android, but not on iOS.

  ChannelIO.track('event name', {
    average: averageRating,
  });

Result:

Case IOS Android
3 3 3
3.12 3.12 3
3.5 3.5 4

I have to cast the average to string to keep it in float format.

  ChannelIO.track('event name', {
    average: averageRating.toString(),
  });

Could this be due to differences in the JavaScript Core engine on iOS and Hermes on Android, or is it a rounding issue somewhere?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions