We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14bc980 commit 97f4f21Copy full SHA for 97f4f21
src/parser/style.js
@@ -13,17 +13,15 @@ type StyleObjectType = {
13
function styleParser(styleObjectArray: StyleObjectType[]): Promise<string> {
14
return new Promise((resolve) => {
15
let output = '';
16
- if (!styleObjectArray || styleObjectArray.length === 0) {
17
- resolve(output);
18
- } else {
+ if (styleObjectArray && styleObjectArray.length > 0) {
19
for (const styleObject of styleObjectArray) {
20
if(styleObject.lang === 'scss' || styleObject.lang === 'less') {
21
console.error('Sorry please only use plain CSS in your files for now');
22
}
23
output += new CleanCSS({}).minify(styleObject.content).styles;
24
25
26
+ resolve(output);
27
});
28
29
0 commit comments