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
pluris authored and marco-ippolito committed May 3, 2024
1 parent d34fd21 commit 1c1a693
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 1c1a693

Please sign in to comment.