From 3b15c66fc3614dd1979598ed3725f4d0996d2324 Mon Sep 17 00:00:00 2001 From: teidesu <86301490+teidesu@users.noreply.github.com> Date: Wed, 11 May 2022 11:50:09 +0300 Subject: [PATCH] fix(client): fixed inspecting buffers i may actually be retarded --- packages/client/src/types/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/types/utils.ts b/packages/client/src/types/utils.ts index 42053b26..95d58db5 100644 --- a/packages/client/src/types/utils.ts +++ b/packages/client/src/types/utils.ts @@ -29,7 +29,7 @@ function getAllGettersNames(obj: object): string[] { return getters } -const bufferToJsonOriginal = (Buffer as any).toJSON +const bufferToJsonOriginal = Buffer.prototype.toJSON const bufferToJsonInspect = function (this: Buffer) { return this.toString('base64') } /** @@ -77,7 +77,7 @@ export function makeInspectable( }) if (!nested) { - (Buffer as any).toJSON = bufferToJsonOriginal + Buffer.prototype.toJSON = bufferToJsonOriginal } return ret