forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreact-pdf+6.2.2.patch
28 lines (26 loc) · 1.13 KB
/
react-pdf+6.2.2.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/node_modules/react-pdf/dist/esm/Document.js b/node_modules/react-pdf/dist/esm/Document.js
index 91db4d4..82cafec 100644
--- a/node_modules/react-pdf/dist/esm/Document.js
+++ b/node_modules/react-pdf/dist/esm/Document.js
@@ -78,7 +78,10 @@ var Document = /*#__PURE__*/function (_PureComponent) {
cancelRunningTask(_this.runningTask);
// If another loading is in progress, let's destroy it
- if (_this.loadingTask) _this.loadingTask.destroy();
+ if (_this.loadingTask) {
+ _this.loadingTask._worker.destroy();
+ _this.loadingTask.destroy();
+ };
var cancellable = makeCancellable(_this.findDocumentSource());
_this.runningTask = cancellable;
cancellable.promise.then(function (source) {
@@ -251,7 +254,10 @@ var Document = /*#__PURE__*/function (_PureComponent) {
cancelRunningTask(this.runningTask);
// If loading is in progress, let's destroy it
- if (this.loadingTask) this.loadingTask.destroy();
+ if (this.loadingTask) {
+ this.loadingTask._worker.destroy();
+ this.loadingTask.destroy();
+ };
}
}, {
key: "childContext",