mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Merge pull request #14600 from Snuffleupagus/getPageIndex-more-validation
[api-minor] Add validation for the `PDFDocumentProxy.getPageIndex` method
This commit is contained in:
commit
cf7ce0aa7e
3 changed files with 57 additions and 46 deletions
|
@ -454,8 +454,8 @@ class WorkerMessageHandler {
|
|||
});
|
||||
});
|
||||
|
||||
handler.on("GetPageIndex", function wphSetupGetPageIndex({ ref }) {
|
||||
const pageRef = Ref.get(ref.num, ref.gen);
|
||||
handler.on("GetPageIndex", function wphSetupGetPageIndex(data) {
|
||||
const pageRef = Ref.get(data.num, data.gen);
|
||||
return pdfManager.ensureCatalog("getPageIndex", [pageRef]);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue