diff options
author | Xuguang Mei <meixg@foxmail.com> | 2022-04-04 22:14:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-04 22:14:39 +0300 |
commit | 46b633f44123d827c00977154df13c68c7b181ae (patch) | |
tree | 90c7d274c246b712c5f6b3babd22c1821dfe5e50 /lib | |
parent | 54819f08e0c469528901d81a9cee546ea518a5c3 (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.js | 2 |
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 { |