diff --git a/editor/src/Editor.vue b/editor/src/Editor.vue index 54b7d05f..c33635a7 100644 --- a/editor/src/Editor.vue +++ b/editor/src/Editor.vue @@ -193,8 +193,8 @@ }, async injectStyle(item) { - if (item.content === '') return; - const result = await ClientIPC.send('bd-editor-injectStyle', { id: item.name.split('.')[0], style: item.content, mode: item.mode }); + const style = item.content.length <= 0 ? ' ' : item.content; + const result = await ClientIPC.send('bd-editor-injectStyle', { id: item.name.split('.')[0], style, mode: item.mode }); return result; },