From 10f37a76b4fd5e810142e7991596ba86452a51e4 Mon Sep 17 00:00:00 2001 From: davebalmer Date: Sat, 28 May 2011 00:23:49 +0100 Subject: [PATCH] Removed pointless temp var --- js/data/dispatch.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/data/dispatch.js b/js/data/dispatch.js index 4415631..34d11c9 100644 --- a/js/data/dispatch.js +++ b/js/data/dispatch.js @@ -70,9 +70,11 @@ joDispatch.prototype = { if (typeof url === 'undefined') return; - var handler = { url: url.toLowerCase(), call: call, context: (typeof context !== undefined) ? context : null }; - - this.handlers.push(handler); + this.handlers.push({ + url: url.toLowerCase(), + call: call, + context: (typeof context !== undefined) ? context : null + }); this.handlers = this.handlers.sort(compare); function compare(a, b) { @@ -91,7 +93,6 @@ joDispatch.prototype = { url = url.toLowerCase(); for (var i = 0, l = h.length; i < l; i++) { -// console.log(h[i].url); if (url.indexOf(h[i].url, 0) === 0) return h[i]; }