From dfda6fed61ccd90fc96a06e722cd570f3bd71f53 Mon Sep 17 00:00:00 2001 From: Jungku Lee Date: Sun, 14 Apr 2024 01:04:48 +0900 Subject: [PATCH] buffer: add missing ARG_TYPE(ArrayBuffer) for isUtf8 PR-URL: https://github.com/nodejs/node/pull/52477 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Deokjin Kim Reviewed-By: Yagiz Nizipli Reviewed-By: Luigi Pinca --- lib/buffer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/buffer.js b/lib/buffer.js index d66d5650f30e73..fb0697d69adf79 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -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) {