Permalink
Browse files

Removed pointless temp var

  • Loading branch information...
1 parent 6110292 commit 10f37a76b4fd5e810142e7991596ba86452a51e4 @davebalmer committed May 27, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 js/data/dispatch.js
View
@@ -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];
}

0 comments on commit 10f37a7

Please sign in to comment.