1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Check that AbortSignal.any() is supported in PDFViewer too (PR 18586 follow-up)

Without this patch the viewer may break on load, since the check added in PR 18586 only applies to the toolbar.
This commit is contained in:
Jonas Jenwald 2024-08-09 16:46:08 +02:00
parent b7198d316f
commit da9cfe7781

View file

@ -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) {