From 412d2e4486a85f29fe2747f4e6a1da3ac0e182d6 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Wed, 24 Feb 2010 12:47:40 -0500 Subject: [PATCH] avoiding isFunction in _.include --- underscore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore.js b/underscore.js index 8839a5bc4..1ddd106aa 100644 --- a/underscore.js +++ b/underscore.js @@ -172,7 +172,7 @@ // Determine if a given value is included in the array or object using '==='. _.include = function(obj, target) { - if (obj && _.isFunction(obj.indexOf)) return _.indexOf(obj, target) != -1; + if (obj && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; return !! _.detect(obj, function(value) { return value === target; });