Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Commit

Permalink
Fix incorrect header type #290
Browse files Browse the repository at this point in the history
  • Loading branch information
wkh237 committed Mar 20, 2017
1 parent 327bbc6 commit f451a2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ function fetch(...args:any):Promise {

// # 241 normalize null or undefined headers, in case nil or null string
// pass to native context
headers = _.map(headers, (h) => h || '' );
headers = _.reduce(headers, (result, value, key) => {
result[key] = value || ''
return result
}, {});

// fetch from file system
if(URIUtil.isFileURI(url)) {
Expand Down

0 comments on commit f451a2c

Please sign in to comment.