Skip to content

Commit 4afcea2

Browse files
authored
fix: exception on folder depth > 1 (#160)
1 parent beadd66 commit 4afcea2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

get-files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function getFiles (path, keepRoot, cb) {
3838
traversePath(path, getFileInfo, (err, files) => {
3939
if (err) return cb(err)
4040

41-
if (Array.isArray(files)) files = files.flat()
41+
if (Array.isArray(files)) files = files.flat(Infinity)
4242
else files = [files]
4343

4444
path = corePath.normalize(path)

0 commit comments

Comments
 (0)