mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 20:37:48 +00:00
Add instanceof memory leak warning to _.isArray.
Former-commit-id: f90b1ad1850fb21c1d976f037a382c7388496d1c
This commit is contained in:
@@ -1180,6 +1180,8 @@
|
|||||||
* // => true
|
* // => true
|
||||||
*/
|
*/
|
||||||
var isArray = nativeIsArray || function(value) {
|
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;
|
return value instanceof Array || toString.call(value) == arrayClass;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user