Skip to content

Commit 3bd15a7

Browse files
author
Kevin WENNER
committed
fix(file-list): use lodash find()
Use lodash find() instead of ES6 Array.prototype.find. ES6 find is not available on standard node installations (without the harmony flag) Closes #1533
1 parent 69cd909 commit 3bd15a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/file-list.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ List.prototype._isExcluded = function (path) {
9999
//
100100
// Returns the match or `undefined` if none found.
101101
List.prototype._isIncluded = function (path) {
102-
return this._patterns.find(function (pattern) {
102+
return _.find(this._patterns, function (pattern) {
103103
return mm(path, pattern.pattern)
104104
})
105105
}
@@ -133,7 +133,7 @@ List.prototype._exists = function (path) {
133133
return mm(path, pattern.pattern)
134134
})
135135

136-
return !!patterns.find(function (pattern) {
136+
return !!_.find(patterns, function (pattern) {
137137
return self._findFile(path, pattern)
138138
})
139139
}

0 commit comments

Comments
 (0)