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

Commit 463be7f

Browse files
author
Khoa Bui Hoang Dang
committed
fix: module build failed error at Linter.parseResults
update based on conversation
1 parent 4895987 commit 463be7f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Linter.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ export default class Linter {
113113

114114
parseResults({ results }) {
115115
// add filename for each results so formatter can have relevant filename
116-
results.forEach((r) => {
117-
// eslint-disable-next-line no-param-reassign
118-
r.filePath = this.loaderContext.resourcePath;
119-
});
116+
if (results) {
117+
results.forEach((r) => {
118+
// eslint-disable-next-line no-param-reassign
119+
r.filePath = this.loaderContext.resourcePath;
120+
});
121+
}
120122

121123
return results;
122124
}

0 commit comments

Comments
 (0)