Only define the renderer-option in the GENERIC viewer

Given that the SVG back-end is not defined anywhere except in GENERIC builds, we can remove a little bit of unnecessary code in e.g. the Firefox PDF Viewer.
This commit is contained in:
Jonas Jenwald 2022-06-16 16:11:47 +02:00
parent c3d0858062
commit df79b18a31
3 changed files with 15 additions and 18 deletions

View file

@ -521,7 +521,11 @@ const PDFViewerApplication = {
findController,
scriptingManager:
AppOptions.get("enableScripting") && pdfScriptingManager,
renderer: AppOptions.get("renderer"),
renderer:
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("!PRODUCTION || GENERIC")
? AppOptions.get("renderer")
: null,
l10n: this.l10n,
textLayerMode: AppOptions.get("textLayerMode"),
annotationMode: AppOptions.get("annotationMode"),