File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change 55var debug = require ( 'debug' ) ( 'httpsnippet' )
66var es = require ( 'event-stream' )
77var MultiPartForm = require ( 'form-data' )
8- var FormDataPolyfill = require ( 'form-data/lib/form_data' )
98var qs = require ( 'querystring' )
109var reducer = require ( './helpers/reducer' )
1110var targets = require ( './targets' )
@@ -128,7 +127,7 @@ HTTPSnippet.prototype.prepare = function (request) {
128127 // This hack is pretty awful but it's the only way we can use this library in the browser as if we code this
129128 // against just the native FormData object, we can't polyfill that back into Node because Blob and File objects,
130129 // which something like `formdata-polyfill` requires, don't exist there.
131- const isNativeFormData = ! ( form instanceof FormDataPolyfill )
130+ const isNativeFormData = ( typeof form [ Symbol . iterator ] === 'function' )
132131
133132 // easter egg
134133 const boundary = '---011000010111000001101001'
You can’t perform that action at this time.
0 commit comments