mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Trying to fix #3611
This commit is contained in:
parent
e79935d8b3
commit
de179e3d9b
1 changed files with 6 additions and 0 deletions
|
@ -408,6 +408,12 @@ var Catalog = (function CatalogClosure() {
|
|||
},
|
||||
|
||||
getPage: function Catalog_getPage(pageIndex) {
|
||||
if (pageIndex < 0 || pageIndex >= this.numPages ||
|
||||
(pageIndex|0) !== pageIndex) {
|
||||
var pagePromise = new Promise();
|
||||
pagePromise.reject(new Error('Invalid page index'));
|
||||
return pagePromise;
|
||||
}
|
||||
if (!(pageIndex in this.pagePromises)) {
|
||||
this.pagePromises[pageIndex] = new Promise();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue