Skip to content

Commit

Permalink
fix: exception on folder depth > 1 (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
akiroz authored Mar 10, 2022
1 parent beadd66 commit 4afcea2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion get-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function getFiles (path, keepRoot, cb) {
traversePath(path, getFileInfo, (err, files) => {
if (err) return cb(err)

if (Array.isArray(files)) files = files.flat()
if (Array.isArray(files)) files = files.flat(Infinity)
else files = [files]

path = corePath.normalize(path)
Expand Down

0 comments on commit 4afcea2

Please sign in to comment.