No need to compile if not scss
This commit is contained in:
parent
d02f894d4a
commit
1b6f3005f5
|
@ -70,7 +70,13 @@ export default class Editor extends Module {
|
|||
event.reply('ok');
|
||||
});
|
||||
|
||||
BDIpc.on('editor-injectStyle', async (event, { id, style }) => {
|
||||
BDIpc.on('editor-injectStyle', async (event, { id, style, mode }) => {
|
||||
if (mode !== 'scss') {
|
||||
await this.sendToDiscord('editor-injectStyle', { id, style });
|
||||
event.reply('ok');
|
||||
return;
|
||||
}
|
||||
|
||||
sass.render({ data: style }, (err, result) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
},
|
||||
|
||||
async injectStyle(item) {
|
||||
const result = await ClientIPC.send('bd-editor-injectStyle', { id: item.name.split('.')[0], style: item.content });
|
||||
const result = await ClientIPC.send('bd-editor-injectStyle', { id: item.name.split('.')[0], style: item.content, mode: item.mode });
|
||||
return result;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue