mirror of
https://github.com/zadam/trilium.git
synced 2025-01-15 11:39:37 +08:00
fix displaying error message in mermaid, closes #3841
This commit is contained in:
parent
8226f62ded
commit
1d3272e9f8
1 changed files with 2 additions and 2 deletions
|
@ -73,6 +73,8 @@ export default class MermaidWidget extends NoteContextAwareWidget {
|
||||||
|
|
||||||
const wheelZoomLoaded = libraryLoader.requireLibrary(libraryLoader.WHEEL_ZOOM);
|
const wheelZoomLoaded = libraryLoader.requireLibrary(libraryLoader.WHEEL_ZOOM);
|
||||||
|
|
||||||
|
this.$errorContainer.hide();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.renderSvg(async renderedSvg => {
|
await this.renderSvg(async renderedSvg => {
|
||||||
this.$display.html(renderedSvg);
|
this.$display.html(renderedSvg);
|
||||||
|
@ -87,8 +89,6 @@ export default class MermaidWidget extends NoteContextAwareWidget {
|
||||||
speed: 20,
|
speed: 20,
|
||||||
zoomOnClick: false
|
zoomOnClick: false
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$errorContainer.hide();
|
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.$errorMessage.text(e.message);
|
this.$errorMessage.text(e.message);
|
||||||
|
|
Loading…
Reference in a new issue