From 3bd15a7fc467830af107baa3a4a5469cc5ac2daa Mon Sep 17 00:00:00 2001 From: Kevin WENNER Date: Mon, 3 Aug 2015 15:53:54 +0200 Subject: [PATCH] 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 --- lib/file-list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/file-list.js b/lib/file-list.js index b512caf8b..c5a1e23de 100644 --- a/lib/file-list.js +++ b/lib/file-list.js @@ -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) }) } @@ -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) }) }