diff options
Diffstat (limited to 'framework/Web/Javascripts/prototype/enumerable.js')
-rw-r--r-- | framework/Web/Javascripts/prototype/enumerable.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/framework/Web/Javascripts/prototype/enumerable.js b/framework/Web/Javascripts/prototype/enumerable.js index 79cb8b3f..c3535b81 100644 --- a/framework/Web/Javascripts/prototype/enumerable.js +++ b/framework/Web/Javascripts/prototype/enumerable.js @@ -102,7 +102,7 @@ var Enumerable = { var result; this.each(function(value, index) { value = (iterator || Prototype.K)(value, index); - if (value >= (result || value)) + if (result == undefined || value >= result) result = value; }); return result; @@ -112,7 +112,7 @@ var Enumerable = { var result; this.each(function(value, index) { value = (iterator || Prototype.K)(value, index); - if (value <= (result || value)) + if (result == undefined || value < result) result = value; }); return result; @@ -164,8 +164,7 @@ var Enumerable = { var collections = [this].concat(args).map($A); return this.map(function(value, index) { - iterator(value = collections.pluck(index)); - return value; + return iterator(collections.pluck(index)); }); }, |