ソースを参照

Add missing API call #229

Ben Hsieh 7 年 前
コミット
2e61ac41de
共有2 個のファイルを変更した6 個の追加2 個の削除を含む
  1. 4
    1
      src/index.js
  2. 2
    1
      src/ios.js

+ 4
- 1
src/index.js ファイルの表示

@@ -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)) {

+ 2
- 1
src/ios.js ファイルの表示

@@ -49,5 +49,6 @@ function excludeFromBackupKey(url:string) {
49 49
 
50 50
 export default {
51 51
   openDocument,
52
-  previewDocument
52
+  previewDocument,
53
+  excludeFromBackupKey
53 54
 }