The code was failing when there is a file or folder that was not in supported format list even when ignore:true is set in the options. I think there is no need to return true in _.each loop because the code is already throwing an error if the format is not supported and ignore is set to false. Instead, if there was no error thrown, add only files that are supported.
The code was failing when there is a file or folder that was not in supported format list even when ignore:true is set in the options. I think there is no need to return true in _.each loop because the code is already throwing an error if the format is not supported and ignore is set to false. Instead, if there was no error thrown, add only files that are supported.