Merge pull request #11346 from Snuffleupagus/pageViewsReady-printing
Ensure that attempting to print with `disableAutoFetch` set will fail gracefully (issue 11339)
This commit is contained in:
commit
026121286c
@ -181,7 +181,14 @@ class BaseViewer {
|
||||
* @type {boolean} - True if all {PDFPageView} objects are initialized.
|
||||
*/
|
||||
get pageViewsReady() {
|
||||
return this._pageViewsReady;
|
||||
if (!this._pageViewsReady) {
|
||||
return false;
|
||||
}
|
||||
// Prevent printing errors when 'disableAutoFetch' is set, by ensuring
|
||||
// that *all* pages have in fact been completely loaded.
|
||||
return this._pages.every(function(pageView) {
|
||||
return !!(pageView && pageView.pdfPage);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user