From 77804907b67a05fb651fa31f0320ada4e94aed29 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 9 Feb 2013 10:08:43 -0800 Subject: [PATCH] Make `whereIndicator` check strict and make the `_.where` deep object comparison unit test deeper. Former-commit-id: b9c59ff56b3ab7acd519888407de5dd02d6475cf --- dist/lodash.compat.js | 2 +- dist/lodash.compat.min.js | 2 +- dist/lodash.js | 2 +- dist/lodash.min.js | 2 +- lodash.js | 2 +- test/test.js | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index 69c3cc35b..954f452e4 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -1439,7 +1439,7 @@ */ function isEqual(a, b, callback, thisArg, stackA, stackB) { // used to indicate that when comparing objects, `a` has at least the properties of `b` - var whereIndicator = callback == indicatorObject; + var whereIndicator = callback === indicatorObject; if (callback && !whereIndicator) { callback = typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg, 2); var result = callback(a, b); diff --git a/dist/lodash.compat.min.js b/dist/lodash.compat.min.js index 14211df2c..5cab19ccd 100644 --- a/dist/lodash.compat.min.js +++ b/dist/lodash.compat.min.js @@ -10,7 +10,7 @@ return(t.b||t.i)&&(r+="}"),r+=t.c+";return t",Function("e,h,j,k,l,q,o","return function("+n+"){"+r+"}")(f,Ot,h,lr,A,rr,Rt)}function c(n){return"\\"+er[n]}function l(n){return sr[n]}function p(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function s(){}function v(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=Array(0>r?0:r);++er?$t(0,u+r):r)||0,typeof u=="number"?o=-1<(A(n)?n.indexOf(t,r):z(n,t,r)):fr(n,function(n){return++er?0:r);++er?xt(0,u+r):r)||0,typeof u=="number"?o=-1<(x(n)?n.indexOf(t,r):M(n,t,r)):Gt(n,function(n){return++e