buffer icon indicating copy to clipboard operation
buffer copied to clipboard

Buffer.prototype.slice fails in in IE11

Open markb-trustifi opened this issue 6 years ago • 2 comments

When running it in IE11 I get this error:

SCRIPT5045: Assignment to read-only properties is not allowed in strict mode
index.js (1075,1)

As a workaround I can remove 'use strict' and then the error disappears. I have AngularJS 1.7 with browserify.

markb-trustifi avatar Dec 16 '18 14:12 markb-trustifi

It's not clear to me why IE11 does not allow assignment to Buffer.prototype.slice since it's our own class, and we don't mark slice as read-only. If someone has an idea, please send a PR.

feross avatar Aug 23 '19 22:08 feross

for people who still need to adapt silly IE11 using webpack1 or something use this package

window.TYPED_ARRAY_SUPPORT = false

can help

githoniel avatar Aug 25 '21 03:08 githoniel