Skip to content

Commit

Permalink
Check that AbortSignal.any() is supported in PDFViewer too (PR 18…
Browse files Browse the repository at this point in the history
…586 follow-up)

Without this patch the viewer may break on load, since the check added in PR 18586 only applies to the toolbar.
  • Loading branch information
Snuffleupagus committed Aug 9, 2024
1 parent b7198d3 commit da9cfe7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/pdf_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,11 @@ class PDFViewer {
viewer.before(element);
}

if (annotationEditorMode !== AnnotationEditorType.DISABLE) {
if (
((typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) ||
typeof AbortSignal.any === "function") &&
annotationEditorMode !== AnnotationEditorType.DISABLE
) {
const mode = annotationEditorMode;

if (pdfDocument.isPureXfa) {
Expand Down

0 comments on commit da9cfe7

Please sign in to comment.