Skip to content

Commit

Permalink
chore: move check out of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 authored Jun 15, 2023
1 parent 9559461 commit 6cf9c82
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,10 @@ export const getFilteredChangedFiles = async ({
[ChangeTypeEnum.Unmerged]: [],
[ChangeTypeEnum.Unknown]: []
}
const hasFilePatterns = filePatterns.length > 0

for (const changeType of Object.keys(allDiffFiles)) {
const files = allDiffFiles[changeType as ChangeTypeEnum]
const hasFilePatterns = filePatterns.length > 0

if (hasFilePatterns) {
changedFiles[changeType as ChangeTypeEnum] = mm(files, filePatterns, {
dot: true,
Expand Down

0 comments on commit 6cf9c82

Please sign in to comment.