Skip to content

Commit f9ce22c

Browse files
Merge pull request #11700 from Snuffleupagus/viewer-JS-warn
Ensure that the JavaScript-warning is always displayed, in the viewer, regardless of browser printing support
2 parents 1bc5cef + b3d7d1c commit f9ce22c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,9 +1225,6 @@ const PDFViewerApplication = {
12251225
});
12261226

12271227
pagesPromise.then(async () => {
1228-
if (!this.supportsPrinting) {
1229-
return;
1230-
}
12311228
const [openAction, javaScript] = await Promise.all([
12321229
openActionPromise,
12331230
pdfDocument.getJavaScript(),
@@ -1259,6 +1256,9 @@ const PDFViewerApplication = {
12591256
}
12601257
}
12611258

1259+
if (!this.supportsPrinting) {
1260+
return;
1261+
}
12621262
if (triggerAutoPrint) {
12631263
setTimeout(function() {
12641264
window.print();

0 commit comments

Comments
 (0)