buffer: return this in fill() for chainability

This commit is contained in:
Brian White 2013-05-28 23:36:26 -04:00 committed by Ben Noordhuis
parent 6b654c0b13
commit 6af8788f3e

View File

@ -468,9 +468,10 @@ Buffer.prototype.fill = function fill(value, start, end) {
throw new RangeError('end out of bounds');
}
return this.parent.fill(value,
start + this.offset,
end + this.offset);
this.parent.fill(value,
start + this.offset,
end + this.offset);
return this;
};