Skip to content

buffer: improve error handling of buffer.concat

Resolved TODO to use more proper error code INVALID_ARG_TYPE -> INVALID_ARG_VALUE, it seems better
Additionally, when the list argument has null or undefined and the length argument is undefined, it causes TypeError: Cannot read properties error. It has been adjusted to be handled by the INVALID_ARG_VALUE error. And, reflected this changes to tests

Refs: https://github.com/nodejs/node/pull/19445

Merge request reports

Loading