From 974911f24f99c90e2929376b21c46e9ad1c77973 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Fri, 2 Aug 2024 09:50:42 +0200 Subject: [PATCH] [Editor] Don't create the image settings dialog if new alt-text is disabled --- web/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/app.js b/web/app.js index 9c483fc244e17..24294d39b36eb 100644 --- a/web/app.js +++ b/web/app.js @@ -557,7 +557,10 @@ const PDFViewerApplication = { } } - if (appConfig.secondaryToolbar?.imageAltTextSettingsButton) { + if ( + this.mlManager && + appConfig.secondaryToolbar?.imageAltTextSettingsButton + ) { this.imageAltTextSettings = new ImageAltTextSettings( appConfig.altTextSettingsDialog, this.overlayManager,