linkedEdges data for portals remains in some cases (when they decay?), so don't process the link data in this case

This commit is contained in:
Jon Atkins
2013-07-20 20:27:24 +01:00
parent e321b06875
commit c3576d566b
2 changed files with 7 additions and 2 deletions

View File

@ -353,8 +353,9 @@ window.handleDataResponse = function(data, fromCache, tile_ids) {
// when both source and destination portal are in the same response, no explicit 'edge' is returned
// instead, we need to reconstruct them from the data within the portal details
// (note that some portals - decayed? - retain these links when they return to neutral. skip these!)
if ('portalV2' in portal[2] && 'linkedEdges' in portal[2].portalV2) {
if ('portalV2' in portal[2] && 'linkedEdges' in portal[2].portalV2 && portal[2].controllingTeam.team != 'NEUTRAL') {
$.each(portal[2].portalV2.linkedEdges, function (ind, edge) {
if (!ppp[edge.otherPortalGuid])
return;