-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
Buffer.prototype.slice does not work on iOS 10 #136
Comments
@jonasschnelli Can you share the version of |
This is due to ES6 support improving in Safari. This issue was fixed a while ago. It looks like you're not using the latest version of Cheers! |
Thanks. I'll try to bump to the latest version, |
var arr = Uint8Array.from([1, 2, 3, 4]) is returning "2" on every other platform, and "1" on ios10 traced it to the function: Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined |
@psionic81 That code returns 2 for me. var arr = Uint8Array.from([1, 2, 3, 4])
alert(arr.subarray(0, 2).byteLength) // 2 |
yep your suggested fix worked fine, thanks for posting it took so long to track this down to the library that had the dependancy that was the issue.. thanks for making your standards completely unstandard apple lol |
I have updated Buffer to 5.0.0, Browserify to 13.1.0, still has that problem. it craps on Buffer.prototype.slice function
that subarray return same buffer. it is problem of iOS 10 ? I fix this by using
to get all module using 'buffer'. and remove those version older than 4.9.0, or modify the package.json to using latest and reinstall. Of-course you should 'npm install buffer --save' first |
@lamaslam Where did you find that call to Also, you don't need to explicitly install or depend on this |
I tracked down an issue on cordova (includes node.js) where
Buffer.prototype.slice
result in returning the same value as the input buffer.In iOS <10, this results shifting out 16 bytes:
In iOS 10,
this.cache
will be unmodified.I haven't tracked it down, but seems to be a
Buffer.TYPED_ARRAY_SUPPORT
problem.If I remove the if at
buffer/index.js
Line 1078 in c5267f4
The text was updated successfully, but these errors were encountered: