Skip to content

Commit 9988c79

Browse files
Merge pull request #67 from express-vue/feature/fix-style-parser
fix for styleparser
2 parents a539073 + fbdcbac commit 9988c79

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/parser/style.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ type StyleObjectType = {
1111
}
1212

1313
function styleParser(styleObjectArray: StyleObjectType[]): Promise<string> {
14-
return new Promise((resolve, reject) => {
15-
if (!styleObjectArray && styleObjectArray.length === 0) {
16-
reject(new Error('missing style section'));
14+
return new Promise((resolve) => {
15+
if (!styleObjectArray || styleObjectArray.length === 0) {
16+
resolve('');
1717
} else {
1818
for (const styleObject of styleObjectArray) {
1919
if(styleObject.lang === 'scss' || styleObject.lang === 'less') {

0 commit comments

Comments
 (0)