Skip to content
Snippets Groups Projects
Commit a7942636 authored by Insua's avatar Insua Committed by 花裤衩
Browse files

fix(Tinymce): When content is null,set content to '' to avoid error (#732)

When get rich editor value(null) from backend,it will occur error
```
Error in nextTick: "TypeError: Cannot read property 'replace' of null"
```
So I set val to '' to avoid it
parent 31d9da8b
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,8 @@ export default {
watch: {
value(val) {
if (!this.hasChange && this.hasInit) {
this.$nextTick(() => window.tinymce.get(this.tinymceId).setContent(val))
this.$nextTick(() =>
window.tinymce.get(this.tinymceId).setContent(val || ''))
}
}
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment