We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edf943b commit a3a9087Copy full SHA for a3a9087
src/index.vue
@@ -62,12 +62,21 @@ export default {
62
}
63
64
this.$el.removeAttribute('data-processed');
65
- mermaid.parseError = error => this.$emit('parse-error', error);
66
67
- await mermaid.run({
68
- nodes: [this.$el],
69
- postRenderCallback: () => this.$emit('rendered'),
70
- });
+ mermaid.parseError = error => {
+ console.log('reacting to parse-error');
+ console.log(error);
+ this.$emit('parse-error', error);
+ };
71
+
72
+ try {
73
+ await mermaid.run({
74
+ nodes: [this.$el],
75
+ postRenderCallback: () => this.$emit('rendered'),
76
+ });
77
+ } catch {
78
+ // Mermaid will throw the error although the parseError function is set
79
+ }
80
},
81
immediate: true,
82
0 commit comments