Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorXuguang Mei <meixg@foxmail.com>2022-04-04 22:14:39 +0300
committerGitHub <noreply@github.com>2022-04-04 22:14:39 +0300
commit46b633f44123d827c00977154df13c68c7b181ae (patch)
tree90c7d274c246b712c5f6b3babd22c1821dfe5e50 /lib
parent54819f08e0c469528901d81a9cee546ea518a5c3 (diff)
buffer: improve Blob constructor error message when passing a string
resolve: https://github.com/nodejs/node/issues/38856 PR-URL: https://github.com/nodejs/node/pull/42338 Fixes: https://github.com/nodejs/node/issues/38856 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/blob.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/blob.js b/lib/internal/blob.js
index 68b8d6f89e2..8fee1d91f79 100644
--- a/lib/internal/blob.js
+++ b/lib/internal/blob.js
@@ -138,7 +138,7 @@ class Blob {
if (sources === null ||
typeof sources[SymbolIterator] !== 'function' ||
typeof sources === 'string') {
- throw new ERR_INVALID_ARG_TYPE('sources', 'Iterable', sources);
+ throw new ERR_INVALID_ARG_TYPE('sources', 'a sequence', sources);
}
validateObject(options, 'options');
let {