From f6b26b965bb102691a2df6fe113f9b95702ae614 Mon Sep 17 00:00:00 2001 From: nhamer Date: Wed, 18 Jan 2017 19:40:56 -0800 Subject: [PATCH] Don't process entity if none returned --- code/map_data_request.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/map_data_request.js b/code/map_data_request.js index 514eabd8..24222b9a 100644 --- a/code/map_data_request.js +++ b/code/map_data_request.js @@ -72,8 +72,10 @@ window.MapDataRequest = function() { // add a portalDetailLoaded hook, so we can use the exteneed details to update portals on the map var _this = this; - addHook('portalDetailLoaded',function(data){ - _this.render.processGameEntities([data.ent]); + addHook('portalDetailLoaded', function(data){ + if(data.success) { + _this.render.processGameEntities([data.ent]); + } }); }