File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 66
77var isArray = require ( 'isarray' ) ;
88
9+ var toString = Object . prototype . toString ;
10+ var withNativeBlob = typeof global . Blob === 'function' || toString . call ( global . Blob ) === '[object BlobConstructor]' ;
11+ var withNativeFile = typeof global . File === 'function' || toString . call ( global . File ) === '[object FileConstructor]' ;
12+
913/**
1014 * Module exports.
1115 */
@@ -37,8 +41,8 @@ function hasBinary (obj) {
3741
3842 if ( ( typeof global . Buffer === 'function' && global . Buffer . isBuffer && global . Buffer . isBuffer ( obj ) ) ||
3943 ( typeof global . ArrayBuffer === 'function' && obj instanceof ArrayBuffer ) ||
40- ( typeof global . Blob === 'function' && obj instanceof Blob ) ||
41- ( typeof global . File === 'function' && obj instanceof File )
44+ ( withNativeBlob && obj instanceof Blob ) ||
45+ ( withNativeFile && obj instanceof File )
4246 ) {
4347 return true ;
4448 }
You can’t perform that action at this time.
0 commit comments