From 1d3272e9f8c27106a66227fbb580677ae5d70427 Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 16 Apr 2023 23:41:40 +0200 Subject: [PATCH] fix displaying error message in mermaid, closes #3841 --- src/public/app/widgets/mermaid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/public/app/widgets/mermaid.js b/src/public/app/widgets/mermaid.js index 4a75e643b..857eca97e 100644 --- a/src/public/app/widgets/mermaid.js +++ b/src/public/app/widgets/mermaid.js @@ -73,6 +73,8 @@ export default class MermaidWidget extends NoteContextAwareWidget { const wheelZoomLoaded = libraryLoader.requireLibrary(libraryLoader.WHEEL_ZOOM); + this.$errorContainer.hide(); + try { await this.renderSvg(async renderedSvg => { this.$display.html(renderedSvg); @@ -87,8 +89,6 @@ export default class MermaidWidget extends NoteContextAwareWidget { speed: 20, zoomOnClick: false }); - - this.$errorContainer.hide(); }); } catch (e) { this.$errorMessage.text(e.message);