mirror of https://github.com/nodejs/node.git
Update buffer.js
Co-authored-by: Livia Medeiros <livia@cirno.name>
This commit is contained in:
parent
cf307d2d73
commit
b93a9b417d
|
@ -1144,7 +1144,7 @@ Buffer.prototype.toJSON = function toJSON() {
|
|||
if (this.length > 0) {
|
||||
return {
|
||||
type: 'Buffer',
|
||||
data: ArrayFrom(new Array(this.length), (_value, i) => this[i]),
|
||||
data: ArrayFrom(this),
|
||||
};
|
||||
}
|
||||
return { type: 'Buffer', data: [] };
|
||||
|
|
Loading…
Reference in New Issue