Merge pull request #413 from wkrause13/downloadFileFix

catch error in downloadFile
This commit is contained in:
Hagen Hübel
2018-01-09 10:51:40 +01:00
committed by GitHub
+4 -1
View File
@@ -287,7 +287,7 @@ var RNFS = {
},
read(filepath: string, length: number = 0, position: number = 0, encodingOrOptions?: any): Promise<string> {
var options = {
var options = {
encoding: 'utf8'
};
@@ -483,6 +483,9 @@ var RNFS = {
subscriptions.forEach(sub => sub.remove());
return res;
})
.catch(() => {
return Promise.reject(e);
})
};
},