Skip to content

Commit

Permalink
Merge pull request #4875 from nextcloud/bugfix/4815
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Oct 25, 2023
2 parents 82c1a80 + aca5099 commit 8118778
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nodes/CodeBlockView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ export default {
this.$refs.preview.innerHTML = svg
} catch (e) {
console.debug('Invalid mermaid source', e)
this.viewMode = this.isEditable ? 'side-by-side' : 'code'
if (this.viewMode === 'preview') {
this.viewMode = this.isEditable ? 'side-by-side' : 'code'
}
}
}, 250)
Expand Down

0 comments on commit 8118778

Please sign in to comment.