Skip to content

Commit d60d410

Browse files
committed
Support old-Node Buffer ctor
1 parent 355f7a9 commit d60d410

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/taggers/hash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = function (src, options) {
2121

2222
src.forEach(function (f) {
2323
var input = fs.openSync(f, 'r');
24-
var chunk = Buffer.alloc(256);
24+
var chunk = Buffer.alloc ? Buffer.alloc(256) : (new Buffer(256)).fill(0);
2525
var offset;
2626
while (0 !== (offset = fs.readSync(input, chunk, 0, 256))) {
2727
hash.update(chunk);

0 commit comments

Comments
 (0)