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:
Jonas Jenwald 2021-04-12 13:48:34 +02:00
parent 9360c7cbdc
commit 54ef4370a2

View File

@ -487,7 +487,7 @@ class WorkerMessageHandler {
handler.on("GetPageJSActions", function ({ pageIndex }) {
return pdfManager.getPage(pageIndex).then(function (page) {
return page.jsActions;
return pdfManager.ensure(page, "jsActions");
});
});