Changes

m
thisRoute fix
Line 1: Line 1:  
(function($){
 
(function($){
 
"use strict";
 
"use strict";
console.log("Fleet Reporting v0.3");
+
console.log("Fleet Reporting v0.4");
 
 
 
var routes = {};
 
var routes = {};
Line 15: Line 15:  
thisFleet.sort();
 
thisFleet.sort();
 
fleetIndexer = thisFleet.join("-");
 
fleetIndexer = thisFleet.join("-");
if(typeof routes[] == "undefined"){
+
if(typeof routes[thisRoute] == "undefined"){
routes[$(this).data("route")] = {};
+
routes[thisRoute] = {};
 
}
 
}
if(typeof routes[$(this).data("route")][fleetIndexer] == "undefined"){
+
if(typeof routes[thisRoute][fleetIndexer] == "undefined"){
routes[$(this).data("route")][fleetIndexer] = 0;
+
routes[thisRoute][fleetIndexer] = 0;
 
}
 
}
routes[$(this).data("route")][fleetIndexer]++;
+
routes[thisRoute][fleetIndexer]++;
 
});
 
});
 
console.log(routes);
 
console.log(routes);
15

edits