Skip to content

Commit

Permalink
buffer: add missing ARG_TYPE(ArrayBuffer) for isUtf8
Browse files Browse the repository at this point in the history
PR-URL: #52477
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Jungku Lee authored and aduh95 committed Apr 29, 2024
1 parent 8ae1507 commit dfda6fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ function isUtf8(input) {
return bindingIsUtf8(input);
}

throw new ERR_INVALID_ARG_TYPE('input', ['TypedArray', 'Buffer'], input);
throw new ERR_INVALID_ARG_TYPE('input', ['ArrayBuffer', 'Buffer', 'TypedArray'], input);
}

function isAscii(input) {
Expand Down

0 comments on commit dfda6fe

Please sign in to comment.