Skip to content

Commit fc79a03

Browse files
fix [Error: download interrupted] issue (#792)
* fix download interrupted error on react native pdf * Update README.md * Update README.md
1 parent 39bd672 commit fc79a03

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,3 +367,4 @@ Example:
367367
```
368368
this.pdf.setPage(42); // Display the answer to the Ultimate Question of Life, the Universe, and Everything
369369
```
370+

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ export default class Pdf extends Component {
276276
if (this._mounted) {
277277
this.setState({progress: received / total});
278278
}
279+
})
280+
.catch(async (error) => {
281+
this._onError(error);
279282
});
280283

281284
this.lastRNBFTask

0 commit comments

Comments
 (0)