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);