Skip to content

Commit 0986336

Browse files
authored
Merge pull request #4 from nickeng/master
remove lodash
2 parents dcbde6f + a3d78cb commit 0986336

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import fs from './fs'
2121
import getUUID from './utils/uuid'
2222
import base64 from 'base-64'
2323
import polyfill from './polyfill'
24-
import _ from 'lodash'
2524
import android from './android'
2625
import ios from './ios'
2726
import JSONStream from './json-stream'
@@ -224,8 +223,8 @@ function fetch(...args:any):Promise {
224223

225224
// # 241 normalize null or undefined headers, in case nil or null string
226225
// pass to native context
227-
headers = _.reduce(headers, (result, value, key) => {
228-
result[key] = value || ''
226+
headers = headers && Object.keys(headers).reduce((result, key) => {
227+
result[key] = headers[key] || ''
229228
return result
230229
}, {});
231230

0 commit comments

Comments
 (0)