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