Skip to content

Commit

Permalink
Fixed changedFiles filename reference
Browse files Browse the repository at this point in the history
  • Loading branch information
sebryu committed Sep 25, 2023
1 parent b35b6b9 commit 162c07b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function detectReactComponent(code) {

function detectFunction(changedFiles) {
console.log('detectFunction', changedFiles);
const filteredFiles = _.filter(changedFiles, (file) => file.name && (file.name.endsWith('.js') || file.name.endsWith('.jsx') || file.name.endsWith('.ts') || file.name.endsWith('.tsx')));
const filteredFiles = _.filter((changedFiles), ({ filename }) => filename.endsWith('.js') || filename.endsWith('.jsx') || filename.endsWith('.ts') || filename.endsWith('.tsx'));
return _.some(filteredFiles, (file) => detectReactComponent(file.body));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function detectReactComponent(code) {

function detectFunction(changedFiles) {
console.log('detectFunction', changedFiles);
const filteredFiles = _.filter(changedFiles, (file) => file.name && (file.name.endsWith('.js') || file.name.endsWith('.jsx') || file.name.endsWith('.ts') || file.name.endsWith('.tsx')));
const filteredFiles = _.filter((changedFiles), ({ filename }) => filename.endsWith('.js') || filename.endsWith('.jsx') || filename.endsWith('.ts') || filename.endsWith('.tsx'));
return _.some(filteredFiles, (file) => detectReactComponent(file.body));
}

Expand Down

0 comments on commit 162c07b

Please sign in to comment.