Index: src/array.js |
diff --git a/src/array.js b/src/array.js |
index 44deff7de42c60986741615b1be389f9668dbf85..c50a2926395dd8dcf9009c3e136f89871e363895 100644 |
--- a/src/array.js |
+++ b/src/array.js |
@@ -1398,9 +1398,8 @@ function ArrayReduce(callback, current) { |
var i = 0; |
find_initial: if (%_ArgumentsLength() < 2) { |
for (; i < length; i++) { |
- current = array[i]; |
- if (!IS_UNDEFINED(current) || i in array) { |
- i++; |
+ if (i in array) { |
+ current = array[i++]; |
break find_initial; |
} |
} |
@@ -1435,9 +1434,8 @@ function ArrayReduceRight(callback, current) { |
var i = length - 1; |
find_initial: if (%_ArgumentsLength() < 2) { |
for (; i >= 0; i--) { |
- current = array[i]; |
- if (!IS_UNDEFINED(current) || i in array) { |
- i--; |
+ if (i in array) { |
+ current = array[i--]; |
break find_initial; |
} |
} |