Fixed the issue regarding error if a folder defined in src_folders
is empty when using tags
#3824
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The error originates in the function
applyTagFilter
which lies infolder-walk.js
The cause of the error is that when any folder that is defined in
src_folders
in the filenightwatch.conf.js
, is empty, thelist
parameter of the functionapplyTagFilter
goes undefined. When the function executes, it uses the Array property.map()
onlist
parameter which is undefined and hence the error.To fix this, an if condition is added to the top of the function body which returns the function if the parameter
list
doesn't qualify as an array.Fixes: #3823