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

Commit

Permalink
fix: module build failed error at Linter.parseResults
Browse files Browse the repository at this point in the history
update based on conversation
  • Loading branch information
Khoa Bui Hoang Dang committed Sep 23, 2019
1 parent 4895987 commit 463be7f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Linter.js
Expand Up @@ -113,10 +113,12 @@ export default class Linter {

parseResults({ results }) {
// add filename for each results so formatter can have relevant filename
results.forEach((r) => {
// eslint-disable-next-line no-param-reassign
r.filePath = this.loaderContext.resourcePath;
});
if (results) {
results.forEach((r) => {
// eslint-disable-next-line no-param-reassign
r.filePath = this.loaderContext.resourcePath;
});
}

return results;
}
Expand Down

0 comments on commit 463be7f

Please sign in to comment.