Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed pointless temp var

  • Loading branch information...
commit 10f37a76b4fd5e810142e7991596ba86452a51e4 1 parent 6110292
@davebalmer authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 js/data/dispatch.js
View
9 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];
}
Please sign in to comment.
Something went wrong with that request. Please try again.