Fix CSS editor not updating when empty
This commit is contained in:
parent
fdb6ddd540
commit
c9a20b7fcf
|
@ -47,6 +47,12 @@ export default class {
|
|||
if (sendSource)
|
||||
this.sendToEditor('set-scss', { scss });
|
||||
|
||||
if (!scss) {
|
||||
this._scss = this.css = '';
|
||||
this.sendToEditor('scss-editor', null);
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
this.compile(scss).then(css => {
|
||||
this.css = css;
|
||||
|
|
|
@ -73,8 +73,8 @@ class Comms {
|
|||
});
|
||||
|
||||
BDIpc.on('bd-compileSass', o => {
|
||||
if (!o.args.data && !o.args.path) return;
|
||||
if (o.args.path && o.args.data) {
|
||||
if (typeof o.args.path !== 'string' && typeof o.args.data !== 'string') return;
|
||||
if (typeof o.args.path === 'string' && typeof o.args.data === 'string') {
|
||||
o.args.data = `${o.args.data} @import '${o.args.path}';`;
|
||||
o.args.path = undefined;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue