From ac16754c9cdf4d0a28247ba830676c514db618fb Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Tue, 22 Nov 2022 13:48:41 +0800 Subject: [PATCH] fix: buffer polyfill error Signed-off-by: MiaoWoo --- packages/polyfill/src/buffer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/polyfill/src/buffer.ts b/packages/polyfill/src/buffer.ts index 2a5b5c33..d85b043a 100644 --- a/packages/polyfill/src/buffer.ts +++ b/packages/polyfill/src/buffer.ts @@ -178,7 +178,7 @@ BufferPolyfill.from = function (value, encodingOrOffset, length) { // Note: Change prototype *after* BufferPolyfill.from is defined to workaround Chrome bug: // https://github.com/feross/buffer/pull/148 Object.setPrototypeOf(BufferPolyfill.prototype, Uint8Array.prototype) -Object.setPrototypeOf(Buffer, Uint8Array) +Object.setPrototypeOf(BufferPolyfill, Uint8Array) function assertSize(size) { if (typeof size !== 'number') {