Skip to content

Commit

Permalink
fix displaying error message in mermaid, closes #3841
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed Apr 16, 2023
1 parent 8226f62 commit 1d3272e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/public/app/widgets/mermaid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -87,8 +89,6 @@ export default class MermaidWidget extends NoteContextAwareWidget {
speed: 20,
zoomOnClick: false
});

this.$errorContainer.hide();
});
} catch (e) {
this.$errorMessage.text(e.message);
Expand Down

0 comments on commit 1d3272e

Please sign in to comment.