-
Notifications
You must be signed in to change notification settings - Fork 34
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
null is not an object (evaluating 'TypedArray.BYTES_PER_ELEMENT #75
Comments
Yes, I'm seeing this on React Native too (though it depends on which JS engine is being used). The suggested fix above should indeed work. Another option would be to move the If need be, could even put I'd be happy to submit a PR to fix this. My only concern is how this can be tested without running on a JS engine with no big int support. 😅 |
I just came here to open a PR, but I see that this was fixed in a commit to master. Thanks, @kriszyp! 🎉 |
Hi @kriszyp! Just a friendly bump: would you mind pushing a new version to npm to get this fix out? (I had initially assumed this would be an easy patch version bump, but I see that the diff since the last release is larger than this one commit.) |
Thanks for the reminder, published in v1.5.2. |
Confirmed this fixed my React Native app startup (with Hermes < 0.12). I'm not the issue opener, but I'm pretty sure you can close this. 🙂 |
On browsers not supporting
BigUint64Array
orBigInt64Array
, cbor-x is throwing an exceptionnull is not an object (evaluating 'TypedArray.BYTES_PER_ELEMENT
. This is due to this code: https://github.com/kriszyp/cbor-x/blob/master/decode.js#L1064-L1065You can reproduce this on Safari 13 or IE 11 for instance.
I applied the following patch locally. If I understand correctly, It will still throw if those types are used which might not be ideal.
The text was updated successfully, but these errors were encountered: