mirror of
https://github.com/status-im/react-native-fs.git
synced 2026-08-27 10:01:09 +00:00
Merge pull request #413 from wkrause13/downloadFileFix
catch error in downloadFile
This commit is contained in:
+4
-1
@@ -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);
|
||||
})
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user