diff --git a/src/prototype/lang/enumerable.js b/src/prototype/lang/enumerable.js index f55eac347..8d6648748 100644 --- a/src/prototype/lang/enumerable.js +++ b/src/prototype/lang/enumerable.js @@ -218,8 +218,10 @@ var Enumerable = (function() { iterator = iterator || Prototype.K; var result = true; this.each(function(value, index) { - result = result && !!iterator.call(context, value, index, this); - if (!result) throw $break; + if (!iterator.call(context, value, index, this)) { + result = false; + throw $break; + } }, this); return result; }