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,