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 <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
meixg authored and juanarbol committed Apr 4, 2022
1 parent 99f9880 commit 3fbfd65
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 @@ -139,7 +139,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 3fbfd65

Please sign in to comment.