mirror of https://github.com/nodejs/node.git
buffer: reword Buffer.concat error message
this brings the error messaging in line with other node TypeError messages. fixes joyent/node#7766. PR: #8723 PR-URL: https://github.com/joyent/node/pull/8723 Reviewed-By: James M Snell <jasnell@users.noreply.github.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>pull/23391/head
parent
c8239c08d7
commit
d01a900078
|
@ -475,7 +475,7 @@ Buffer.prototype.fill = function fill(value, start, end) {
|
|||
|
||||
Buffer.concat = function(list, length) {
|
||||
if (!Array.isArray(list)) {
|
||||
throw new TypeError('Usage: Buffer.concat(list, [length])');
|
||||
throw new TypeError('list argument must be an Array of Buffers.');
|
||||
}
|
||||
|
||||
if (list.length === 0) {
|
||||
|
|
Loading…
Reference in New Issue