Skip to content

Commit acac053

Browse files
committed
Use Buffer.alloc in TNodejsFile
new Buffer was deprecated by node.js
1 parent 35e5fa4 commit acac053

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/JSRoot.io.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2470,10 +2470,10 @@ JSROOT.define(['rawinflate'], () => {
24702470
blobs.push(res);
24712471
cnt += 2;
24722472
if (cnt >= place.length) return resolve(blobs);
2473-
this.fs.read(this.fd, new Buffer(place[cnt + 1]), 0, place[cnt + 1], place[cnt], readfunc);
2473+
this.fs.read(this.fd, Buffer.alloc(place[cnt + 1]), 0, place[cnt + 1], place[cnt], readfunc);
24742474
}
24752475

2476-
this.fs.read(this.fd, new Buffer(place[1]), 0, place[1], place[0], readfunc);
2476+
this.fs.read(this.fd, Buffer.alloc(place[1]), 0, place[1], place[0], readfunc);
24772477
});
24782478
}
24792479

0 commit comments

Comments
 (0)