fix(client): fixed inspecting buffers

i may actually be retarded
This commit is contained in:
teidesu 2022-05-11 11:50:09 +03:00
parent b4beeba33c
commit 3b15c66fc3

View file

@ -29,7 +29,7 @@ function getAllGettersNames(obj: object): string[] {
return getters return getters
} }
const bufferToJsonOriginal = (Buffer as any).toJSON const bufferToJsonOriginal = Buffer.prototype.toJSON
const bufferToJsonInspect = function (this: Buffer) { return this.toString('base64') } const bufferToJsonInspect = function (this: Buffer) { return this.toString('base64') }
/** /**
@ -77,7 +77,7 @@ export function makeInspectable(
}) })
if (!nested) { if (!nested) {
(Buffer as any).toJSON = bufferToJsonOriginal Buffer.prototype.toJSON = bufferToJsonOriginal
} }
return ret return ret