Skip to content

Commit

Permalink
fix(file-list): use lodash find()
Browse files Browse the repository at this point in the history
Use lodash find() instead of ES6 Array.prototype.find.
ES6 find is not available on standard node installations
(without the harmony flag)

Closes #1533
  • Loading branch information
Kevin WENNER committed Aug 4, 2015
1 parent 69cd909 commit 3bd15a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/file-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ List.prototype._isExcluded = function (path) {
//
// Returns the match or `undefined` if none found.
List.prototype._isIncluded = function (path) {
return this._patterns.find(function (pattern) {
return _.find(this._patterns, function (pattern) {
return mm(path, pattern.pattern)
})
}
Expand Down Expand Up @@ -133,7 +133,7 @@ List.prototype._exists = function (path) {
return mm(path, pattern.pattern)
})

return !!patterns.find(function (pattern) {
return !!_.find(patterns, function (pattern) {
return self._findFile(path, pattern)
})
}
Expand Down

0 comments on commit 3bd15a7

Please sign in to comment.