From e392ecbf6e422825083bc7204eacb7090619a47c Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 21 Apr 2006 12:36:06 +0000 Subject: Merge from 3.0 branch till 953. --- framework/Web/Javascripts/prototype/enumerable.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'framework/Web/Javascripts/prototype/enumerable.js') 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)); }); }, -- cgit v1.2.3