|
@@ -22,6 +22,7 @@ import fs from './fs'
|
22
|
22
|
import getUUID from './utils/uuid'
|
23
|
23
|
import base64 from 'base-64'
|
24
|
24
|
import polyfill from './polyfill'
|
|
25
|
+import _ from 'lodash'
|
25
|
26
|
import android from './android'
|
26
|
27
|
import ios from './ios'
|
27
|
28
|
import net from './net'
|
|
@@ -219,7 +220,9 @@ function fetch(...args:any):Promise {
|
219
|
220
|
|
220
|
221
|
// # 241 normalize null or undefined headers, in case nil or null string
|
221
|
222
|
// pass to native context
|
222
|
|
- headers = _.map(headers, (h) => h || '');
|
|
223
|
+ _.each(headers, (h,i) => {
|
|
224
|
+ headers[i] = h || ''
|
|
225
|
+ });
|
223
|
226
|
|
224
|
227
|
// fetch from file system
|
225
|
228
|
if(URIUtil.isFileURI(url)) {
|