mirror of https://github.com/nodejs/node.git
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>
This commit is contained in:
parent
54819f08e0
commit
46b633f441
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue