Add instanceof memory leak warning to _.isArray.

Former-commit-id: f90b1ad1850fb21c1d976f037a382c7388496d1c
This commit is contained in:
John-David Dalton
2012-12-11 00:54:09 -08:00
parent f14010a09d
commit 749f49b1a0

View File

@@ -1180,6 +1180,8 @@
* // => true
*/
var isArray = nativeIsArray || function(value) {
// `instanceof` may cause a memory leak in IE 7 if `value` is a host object
// http://ajaxian.com/archives/working-aroung-the-instanceof-memory-leak
return value instanceof Array || toString.call(value) == arrayClass;
};