Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 8af9430

Browse files
committed
fix(sass): dont try to process invalid directories
1 parent 141cb23 commit 8af9430

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/sass.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,16 @@ function addComponentSassFiles(componentPath: string, collectedSassFiles: string
186186

187187

188188
function getSiblingSassFiles(componentPath: string, sassConfig: SassConfig) {
189-
return readdirSync(componentPath).filter(f => {
190-
return isValidSassFile(f, sassConfig);
191-
}).map(f => {
192-
return join(componentPath, f);
193-
});
189+
try {
190+
return readdirSync(componentPath).filter(f => {
191+
return isValidSassFile(f, sassConfig);
192+
}).map(f => {
193+
return join(componentPath, f);
194+
});
195+
} catch (ex) {
196+
// it's an invalid path
197+
return [];
198+
}
194199
}
195200

196201

0 commit comments

Comments
 (0)