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 authored and juanarbol committed Apr 6, 2022
1 parent d64c4fb commit eb3dfc0
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 eb3dfc0

Please sign in to comment.