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: nodejs#38856

PR-URL: nodejs#42338
Fixes: nodejs#38856
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
meixg authored and xtx1130 committed Apr 25, 2022
1 parent 2800d47 commit 03c9532
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/blob.js
Original file line number Diff line number Diff line change
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 03c9532

Please sign in to comment.