Skip to content

Commit f451a2c

Browse files
committed
Fix incorrect header type joltup#290
1 parent 327bbc6 commit f451a2c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,10 @@ function fetch(...args:any):Promise {
220220

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

225228
// fetch from file system
226229
if(URIUtil.isFileURI(url)) {

0 commit comments

Comments
 (0)