fix(client): fixed inspecting buffers
i may actually be retarded
This commit is contained in:
parent
b4beeba33c
commit
3b15c66fc3
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue