Skip to content

Commit

Permalink
Merge pull request #2162 from mguaypaq/mgp/maximum-call-stack
Browse files Browse the repository at this point in the history
fix: avoid Maximum call stack size exceeded
  • Loading branch information
effigies authored Oct 16, 2024
2 parents 35306a2 + 4671868 commit b85c545
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions bids-validator/validators/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ import isNode from '../utils/isNode'
* files from the set.
*/
const session = function missingSessionFiles(fileList) {
const issues = []
const { subjects, sessions } = getDataOrganization(fileList)

issues.push(...missingSessionWarnings(subjects, sessions))

const subject_files = getSubjectFiles(subjects)
issues.push(...missingFileWarnings(subjects, subject_files))

return issues
return [
...missingSessionWarnings(subjects, sessions),
...missingFileWarnings(subjects, subject_files),
]
}

/**
Expand Down

0 comments on commit b85c545

Please sign in to comment.