From 67b0c4cddd03077c720aff779e955e2ee825e3ca Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 12 Aug 2014 21:16:22 -0700 Subject: [PATCH] Use `_.createCallback` if `_.matches` is unavailable for the perf test. --- perf/perf.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perf/perf.js b/perf/perf.js index f5f8841b4..6248b71a6 100644 --- a/perf/perf.js +++ b/perf/perf.js @@ -444,10 +444,10 @@ var source = { "num": 9 };\ \ var _findWhere = _.findWhere || _.find,\ - _match = _.matches && _.matches(source);\ + _match = (_.matches || _.createCallback || _.noop)(source);\ \ var lodashFindWhere = lodash.findWhere || lodash.find,\ - lodashMatch = lodash.matches && lodash.matches(source);\ + lodashMatch = (lodash.matches || lodash.createCallback || lodash.noop)(source);\ }\ if (typeof multiArrays != "undefined") {\ var twentyValues = belt.shuffle(belt.range(20)),\