mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-06 14:27:23 +02:00
Merge pull request #21716 from Snuffleupagus/_initializeAutoPrint-jsActions-Map
Update `PDFViewerApplication._initializeAutoPrint` to handle `getJSActions` returning a Map (PR 21664 follow-up)
This commit is contained in:
commit
1b4055e958
@ -1855,7 +1855,7 @@ const PDFViewerApplication = {
|
||||
console.warn("Warning: JavaScript support is not enabled");
|
||||
|
||||
// Hack to support auto printing.
|
||||
for (const name in jsActions) {
|
||||
for (const [name, actions] of jsActions) {
|
||||
if (triggerAutoPrint) {
|
||||
break;
|
||||
}
|
||||
@ -1867,7 +1867,7 @@ const PDFViewerApplication = {
|
||||
case "DidPrint":
|
||||
continue;
|
||||
}
|
||||
triggerAutoPrint = jsActions[name].some(js => AutoPrintRegExp.test(js));
|
||||
triggerAutoPrint = actions.some(js => AutoPrintRegExp.test(js));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user