Skip to content

Commit 03c9532

Browse files
meixgxtx1130
authored andcommitted
buffer: improve Blob constructor error message when passing a string
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>
1 parent 2800d47 commit 03c9532

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/blob.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class Blob {
138138
if (sources === null ||
139139
typeof sources[SymbolIterator] !== 'function' ||
140140
typeof sources === 'string') {
141-
throw new ERR_INVALID_ARG_TYPE('sources', 'Iterable', sources);
141+
throw new ERR_INVALID_ARG_TYPE('sources', 'a sequence', sources);
142142
}
143143
validateObject(options, 'options');
144144
let {

0 commit comments

Comments
 (0)