fix(codeeditor): empty value set failed.fixed:#659

This commit is contained in:
无木 2021-05-27 19:14:31 +08:00
parent 7e2ca79ece
commit ba2bebb406

View File

@ -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' }
);