Skip to content

Commit

Permalink
buffer: improve Blob constructor error message when passing a string
Browse files Browse the repository at this point in the history
resolve: #38856

PR-URL: #42338
Fixes: #38856
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
meixg committed Apr 4, 2022
1 parent 54819f0 commit 46b633f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/blob.js
Expand Up @@ -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 {
Expand Down

0 comments on commit 46b633f

Please sign in to comment.