Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Removed pointless temp var
  • Loading branch information
davebalmer committed May 27, 2011
1 parent 6110292 commit 10f37a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions js/data/dispatch.js
Expand Up @@ -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) {
Expand All @@ -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];
}
Expand Down

0 comments on commit 10f37a7

Please sign in to comment.