summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorSheogorath2017-10-30 12:30:38 +0100
committerGitHub2017-10-30 12:30:38 +0100
commitdad5798472406aad08b1b1c5433f314fdaa679e7 (patch)
treee64dc13c7c38b4fe5a964fda80c345897c3e6804 /public/js
parentb3c66d4a100899d72a201ad9e95a137c2ceeccf4 (diff)
parente807f1b78393a895a3f5c2e5e1f64c7b44dcfc97 (diff)
Merge pull request #612 from SISheogorath/fix/mermaidErr
Fix mermaid error handling Fixes #610
Diffstat (limited to 'public/js')
-rw-r--r--public/js/extra.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index df5e454e..13b8924c 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -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