Skip to content

Commit

Permalink
fix(codeeditor): empty value set failed.fixed:#659
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetfan committed May 27, 2021
1 parent 7e2ca79 commit ba2bebb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/CodeEditor/src/codemirror/CodeMirror.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
async (v) => {
await nextTick();
const oldValue = editor?.getValue();
v && v !== oldValue && editor?.setValue(v);
if (v !== oldValue) {
editor?.setValue(v ? v : '');
}
},
{ flush: 'post' }
);
Expand Down

0 comments on commit ba2bebb

Please sign in to comment.