fix(mermaid): diagram still displayed on error

This commit is contained in:
Elian Doran 2025-03-18 20:43:11 +02:00
parent 475374a04b
commit 96e2cc29e0
No known key found for this signature in database

View File

@ -116,6 +116,7 @@ export default class MermaidWidget extends NoteContextAwareWidget {
} catch (e: any) { } catch (e: any) {
console.warn(e); console.warn(e);
this.#cleanUpZoom(); this.#cleanUpZoom();
this.$display.empty();
this.$errorMessage.text(e.message); this.$errorMessage.text(e.message);
this.$errorContainer.show(); this.$errorContainer.show();
} }