We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0fffca commit d5a1b1aCopy full SHA for d5a1b1a
lib/buffer.js
@@ -58,8 +58,8 @@ function Buffer(arg) {
58
return fromObject(arg);
59
}
60
61
-Buffer.prototype.__proto__ = Uint8Array.prototype;
62
-Buffer.__proto__ = Uint8Array;
+Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);
+Object.setPrototypeOf(Buffer, Uint8Array);
63
64
65
function SlowBuffer(length) {
@@ -72,8 +72,8 @@ function SlowBuffer(length) {
72
return ui8;
73
74
75
-SlowBuffer.prototype.__proto__ = Buffer.prototype;
76
-SlowBuffer.__proto__ = Buffer;
+Object.setPrototypeOf(SlowBuffer.prototype, Uint8Array.prototype);
+Object.setPrototypeOf(SlowBuffer, Uint8Array);
77
78
79
function allocate(size) {
0 commit comments