From a9e7f2ed9cec6e9363f5be8e4371689c02237364 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Mon, 17 Apr 2017 19:16:47 +0000 Subject: [PATCH] Fix hashchange event handling due to various problems: - initial stop data not loading, - doubled loadTimes() invocations. --- common.js | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common.js b/common.js index 37368a1..6d3f6f9 100644 --- a/common.js +++ b/common.js @@ -33,10 +33,10 @@ // Webservice-related functions function parseVehicle(vehicleId) { - if(!vehicleId) return; + if(!vehicleId) return false; if(vehicleId.substr(0, 15) != '635218529567218') { console.log('Unknown vehicle, vehicleId=' + vehicleId); - return; + return false; } var id = parseInt(vehicleId.substr(15)) - 736; @@ -122,7 +122,7 @@ low = 1; } else { console.log('Unknown vehicle, vehicleId=' + vehicleId + ', id=' + id); - return; + return false; } return { -- Gitblit v1.9.1