mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-06 14:27:23 +02:00
Update PDFViewerApplication._initializeAutoPrint to handle getJSActions returning a Map (PR 21664 follow-up)
This was overlooked in PR 21664, since the code-path in question isn't invoked when scripting is enabled (which is the default value).
This commit is contained in:
parent
5f181fd8b0
commit
3f5b472db2
@ -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