summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2015-09-15 22:37:17 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2015-09-15 22:37:17 +0100
commit654a14555b319b16efaafc4fbfcef4df7c50a6bc (patch)
tree280b71bd8b7300019a2881f1d4ec6b20e1e9266e
parenta0dacfb02f2bfb56294fbe6f4a5052ba9f3a8665 (diff)
downloadleaflet-soton-654a14555b319b16efaafc4fbfcef4df7c50a6bc.tar
leaflet-soton-654a14555b319b16efaafc4fbfcef4df7c50a6bc.tar.gz
Fix error handling
-rwxr-xr-xcreate-data.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/create-data.js b/create-data.js
index fb162b8..1e62d2d 100755
--- a/create-data.js
+++ b/create-data.js
@@ -358,6 +358,11 @@ function getPartToLevelMap(buildingRelations, buildings, callback) {
// Process level relations
async.each(buildingRelations, function(buildingRelation, callback) {
getLevelRelations(buildingRelation, function(err, levelRelations) {
+ if (err) {
+ callback(err);
+ return;
+ }
+
levelRelations.forEach(function(level) {
for (var i=0; i<level.members.length; i++) {