Skip to content

Invalid Integer error on Negative Infinity #10

@lisajamhoury

Description

@lisajamhoury

Thanks so much for this helpful library!

I’m using the binarypack through peer.js to send data from the Kinect 2, using Kinect2 library, which sometimes includes negative infinity. This is causing me to get the error “Invalid Integer” repeatedly from line 400, which is slowing down my peer connection significantly. I’ve fixed it in my own code with adding this as an additional option at line 399:

else if(num===Number.NEGATIVE_INFINITY){num=0;}

In my use case setting num to 0 solves the issue. Although there's likely a better way to add a more universal fix.

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