Stop including the "errorWrapper" HTML code in MOZCENTRAL-builds

Given that these HTML elements are not being used at all in `MOZCENTRAL`-builds, note the preprocessor check in `PDFViewerApplication._otherError`, we obviously don't need the HTML code either.
This commit is contained in:
Jonas Jenwald 2021-02-14 10:39:34 +01:00
parent c79fd71457
commit 7f8a9b12d9
3 changed files with 19 additions and 10 deletions

View file

@ -824,8 +824,10 @@ const PDFViewerApplication = {
async close() {
this._unblockDocumentLoadEvent();
const errorWrapper = this.appConfig.errorWrapper.container;
errorWrapper.hidden = true;
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
const { container } = this.appConfig.errorWrapper;
container.hidden = true;
}
if (!this.pdfLoadingTask) {
return undefined;