Update buffer.js

Co-authored-by: Livia Medeiros <livia@cirno.name>
This commit is contained in:
Yagiz Nizipli 2024-09-08 13:11:56 -04:00 committed by GitHub
parent cf307d2d73
commit b93a9b417d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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: [] };