mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Ensure that PDFThumbnailView.draw
is able to handle RenderingCancelledException
correctly (PR 8157 follow-up)
In PR 8157, I embarrassingly enough forgot to change `pdf_thumbnail_view.js` to match the changes made to `pdf_page_view.js`.
This commit is contained in:
parent
27c3c33eec
commit
db6f2f3718
1 changed files with 6 additions and 2 deletions
|
@ -14,6 +14,7 @@
|
|||
*/
|
||||
|
||||
import { getOutputScale, mozL10n } from './ui_utils';
|
||||
import { RenderingCancelledException } from './pdfjs';
|
||||
import { RenderingStates } from './pdf_rendering_queue';
|
||||
|
||||
var THUMBNAIL_WIDTH = 98; // px
|
||||
|
@ -288,8 +289,11 @@ var PDFThumbnailView = (function PDFThumbnailViewClosure() {
|
|||
if (renderTask === self.renderTask) {
|
||||
self.renderTask = null;
|
||||
}
|
||||
if (error === 'cancelled') {
|
||||
rejectRenderPromise(error);
|
||||
|
||||
if (((typeof PDFJSDev === 'undefined' ||
|
||||
!PDFJSDev.test('PDFJS_NEXT')) && error === 'cancelled') ||
|
||||
error instanceof RenderingCancelledException) {
|
||||
resolveRenderPromise(undefined);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue