Skip to content

Commit b9ddcc1

Browse files
committed
fix: browser
1 parent 2303c1a commit b9ddcc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
export default {
33
mounted() {
44
if (typeof window !== 'undefined') {
5-
const mermaid = require('mermaid')
5+
const mermaid = window.mermaid || require('mermaid')
66
mermaid.parseError = error => this.$emit('parse-error', error)
77
mermaid.initialize({
88
securityLevel: 'loose',

0 commit comments

Comments
 (0)