From e87bf817de34edf8fb9774eb8a23d64c8406a58b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 27 Nov 2013 16:02:24 +0100 Subject: [PATCH] Do not use Base.each() loops where it's not necessary. --- src/core/Callback.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/Callback.js b/src/core/Callback.js index 676a04c4..8f58b5f8 100644 --- a/src/core/Callback.js +++ b/src/core/Callback.js @@ -77,12 +77,12 @@ var Callback = { if (!handlers) return false; var args = [].slice.call(arguments, 1); - Base.each(handlers, function(func) { + for (var i in handlers) { // When the handler function returns false, prevent the default - // behaviour of the event by calling stop() on it - if (func.apply(this, args) === false && event && event.stop) + // behaviour of the event by calling stop() on it. + if (handlers[i].apply(this, args) === false && event && event.stop) event.stop(); - }, this); + } return true; },