Przeglądaj źródła

fix files issue

iou90 8 lat temu
rodzic
commit
49e654775c

+ 1
- 1
autoHeightWebView/index.android.js Wyświetl plik

58
             });
58
             });
59
         }
59
         }
60
         let currentScript = BaseScript;
60
         let currentScript = BaseScript;
61
-        if ((nextProps.files && !this.props.files) || (nextProps.files && this.props.files && JSON.stringify(nextProps.files) !== JSON.stringify(this.props.files))) {
61
+        if (nextProps.files) {
62
             currentScript = this.appendFilesToHead(nextProps.files, BaseScript);
62
             currentScript = this.appendFilesToHead(nextProps.files, BaseScript);
63
         }
63
         }
64
         this.setState({ script: currentScript });
64
         this.setState({ script: currentScript });

+ 1
- 1
autoHeightWebView/index.ios.js Wyświetl plik

24
 
24
 
25
     componentWillReceiveProps(nextProps) {
25
     componentWillReceiveProps(nextProps) {
26
         let currentScript = BaseScript;
26
         let currentScript = BaseScript;
27
-        if ((nextProps.files && !this.props.files) || (nextProps.files && this.props.files && JSON.stringify(nextProps.files) !== JSON.stringify(this.props.files))) {
27
+        if (nextProps.files) {
28
             currentScript = this.appendFilesToHead(nextProps.files, BaseScript);
28
             currentScript = this.appendFilesToHead(nextProps.files, BaseScript);
29
         }
29
         }
30
         this.setState({ script: currentScript });
30
         this.setState({ script: currentScript });

+ 6
- 3
package.json Wyświetl plik

1
 {
1
 {
2
   "name": "react-native-autoheightwebview",
2
   "name": "react-native-autoheightwebview",
3
-  "version": "0.0.16",
3
+  "version": "0.0.17",
4
   "description": "An auto height webview for React Native",
4
   "description": "An auto height webview for React Native",
5
   "main": "autoHeightWebView",
5
   "main": "autoHeightWebView",
6
-  "files": ["android/", "autoHeightWebView/"],
6
+  "files": [
7
+    "android/",
8
+    "autoHeightWebView/"
9
+  ],
7
   "scripts": {
10
   "scripts": {
8
     "test": "echo \"Error: no test specified\" && exit 1"
11
     "test": "echo \"Error: no test specified\" && exit 1"
9
   },
12
   },
17
     "url": "https://github.com/iou90/react-native-autoheightwebview/issues"
20
     "url": "https://github.com/iou90/react-native-autoheightwebview/issues"
18
   },
21
   },
19
   "homepage": "https://github.com/iou90/react-native-autoheightwebview#readme"
22
   "homepage": "https://github.com/iou90/react-native-autoheightwebview#readme"
20
-}
23
+}