catch error in downloadFile

This commit is contained in:
William Krause
2018-01-03 18:12:43 -06:00
parent 5125cd6994
commit fb13cb7c5f
+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);
})
};
},