Ensure that the data is loaded, in the "GetPageJSActions" message handler
Similar to all other data accesses, note e.g. the "GetDocJSActions" handler just above, we need to ensure that a `MissingDataException` isn't propagated to the main-thread if this data is accessed while the PDF document is still loading.
This commit is contained in:
parent
9360c7cbdc
commit
54ef4370a2
@ -487,7 +487,7 @@ class WorkerMessageHandler {
|
|||||||
|
|
||||||
handler.on("GetPageJSActions", function ({ pageIndex }) {
|
handler.on("GetPageJSActions", function ({ pageIndex }) {
|
||||||
return pdfManager.getPage(pageIndex).then(function (page) {
|
return pdfManager.getPage(pageIndex).then(function (page) {
|
||||||
return page.jsActions;
|
return pdfManager.ensure(page, "jsActions");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user