Kaynağa Gözat

Fix #229 immutable HTTP headers issue

Ben Hsieh 7 yıl önce
ebeveyn
işleme
327bbc68ba
1 değiştirilmiş dosya ile 1 ekleme ve 3 silme
  1. 1
    3
      index.js

+ 1
- 3
index.js Dosyayı Görüntüle

220
 
220
 
221
   // # 241 normalize null or undefined headers, in case nil or null string
221
   // # 241 normalize null or undefined headers, in case nil or null string
222
   // pass to native context
222
   // pass to native context
223
-  _.each(headers, (h,i) =>  {
224
-    headers[i] = h || ''
225
-  });
223
+  headers = _.map(headers, (h) => h || '' );
226
 
224
 
227
   // fetch from file system
225
   // fetch from file system
228
   if(URIUtil.isFileURI(url)) {
226
   if(URIUtil.isFileURI(url)) {