mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 02:44:28 -05:00
Merge pull request #612 from SISheogorath/fix/mermaidErr
Fix mermaid error handling Fixes #610
This commit is contained in:
commit
dad5798472
1 changed files with 7 additions and 2 deletions
|
@ -378,9 +378,14 @@ export function finishView (view) {
|
|||
$ele.html($value.text())
|
||||
window.mermaid.init(undefined, $ele)
|
||||
} catch (err) {
|
||||
var errormessage = err
|
||||
if (err.str) {
|
||||
errormessage = err.str
|
||||
}
|
||||
|
||||
$value.unwrap()
|
||||
$value.parent().append('<div class="alert alert-warning">' + err + '</div>')
|
||||
console.warn(err)
|
||||
$value.parent().append('<div class="alert alert-warning">' + errormessage + '</div>')
|
||||
console.warn(errormessage)
|
||||
}
|
||||
})
|
||||
// abc.js
|
||||
|
|
Loading…
Reference in a new issue