mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-06 22:37: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");
|
console.warn("Warning: JavaScript support is not enabled");
|
||||||
|
|
||||||
// Hack to support auto printing.
|
// Hack to support auto printing.
|
||||||
for (const name in jsActions) {
|
for (const [name, actions] of jsActions) {
|
||||||
if (triggerAutoPrint) {
|
if (triggerAutoPrint) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1867,7 +1867,7 @@ const PDFViewerApplication = {
|
|||||||
case "DidPrint":
|
case "DidPrint":
|
||||||
continue;
|
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