We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dbc54e commit c8e3737Copy full SHA for c8e3737
src/Document.jsx
@@ -104,12 +104,12 @@ export default class Document extends PureComponent {
104
const { options, onLoadProgress, onPassword } = this.props;
105
106
try {
107
- const loadingTask = pdfjs.getDocument({ ...source, ...options }).promise;
+ const loadingTask = pdfjs.getDocument({ ...source, ...options });
108
loadingTask.onPassword = onPassword;
109
if (onLoadProgress) {
110
loadingTask.onProgress = onLoadProgress;
111
}
112
- const cancellable = makeCancellable(loadingTask);
+ const cancellable = makeCancellable(loadingTask.promise);
113
this.runningTask = cancellable;
114
const pdf = await cancellable.promise;
115
this.setState((prevState) => {
0 commit comments