From 6efe207d14c79229cb4c02ffd56270ad05f671ce Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 6 Sep 2014 13:06:02 +0100 Subject: Fix bug with fixing workstation data Do not try and process null data if data already exists. --- src/leaflet-soton.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/leaflet-soton.js b/src/leaflet-soton.js index a90c163..b9818bc 100644 --- a/src/leaflet-soton.js +++ b/src/leaflet-soton.js @@ -214,10 +214,13 @@ SELECT * WHERE {\ url: 'http://sparql.data.southampton.ac.uk/?query=' + encodeURIComponent(query) }, function(data) { - // Only report no data if fetching data failed, and there - // is no local data - if (data === null && LS.workstationData === null) { - LS.fire("workstationData", null); + // If fetching data has failed + if (data === null) { + // Only report this if there is no existing data + if (LS.workstationData === null) { + LS.fire("workstationData", null); + } + return; } -- cgit v1.2.3