diff --git a/src/js/array.js b/src/js/array.js index e5e8561e48..896b20fc8f 100644 --- a/src/js/array.js +++ b/src/js/array.js @@ -853,16 +853,8 @@ DEFINE_METHOD_LEN( } } // Lookup through the array. - if (!IS_UNDEFINED(element)) { - for (var i = max; i >= min; i--) { - if (i in array && array[i] === element) return i; - } - return -1; - } for (var i = max; i >= min; i--) { - if (i in array && IS_UNDEFINED(array[i])) { - return i; - } + if (i in array && array[i] === element) return i; } return -1; },