From d6178a13d7384290db2b0582a4e3c1c9c592d2db Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 4 Feb 2023 22:56:20 +0100 Subject: [PATCH] Reduce a tiny bit of duplication in the `webViewerInitialized` function --- web/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app.js b/web/app.js index 5af753a99..a8e1513fe 100644 --- a/web/app.js +++ b/web/app.js @@ -2166,7 +2166,7 @@ function reportPageStatsPDFBug({ pageNumber }) { } function webViewerInitialized() { - const { appConfig, eventBus } = PDFViewerApplication; + const { appConfig, eventBus, l10n } = PDFViewerApplication; let file; if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) { const queryString = document.location.search.substring(1); @@ -2217,7 +2217,7 @@ function webViewerInitialized() { if (!PDFViewerApplication.supportsDocumentFonts) { AppOptions.set("disableFontFace", true); - PDFViewerApplication.l10n.get("web_fonts_disabled").then(msg => { + l10n.get("web_fonts_disabled").then(msg => { console.warn(msg); }); } @@ -2259,7 +2259,7 @@ function webViewerInitialized() { throw new Error("Not implemented: webViewerInitialized"); } } catch (reason) { - PDFViewerApplication.l10n.get("loading_error").then(msg => { + l10n.get("loading_error").then(msg => { PDFViewerApplication._documentError(msg, reason); }); }