diff --git a/code/map_data.js b/code/map_data.js index b170083f..b0c432f5 100644 --- a/code/map_data.js +++ b/code/map_data.js @@ -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; diff --git a/plugins/show-linked-portals.user.js b/plugins/show-linked-portals.user.js index 39392060..45aef5ab 100644 --- a/plugins/show-linked-portals.user.js +++ b/plugins/show-linked-portals.user.js @@ -2,7 +2,7 @@ // @id iitc-plugin-show-linked-portals@fstopienski // @name IITC plugin: Show linked portals // @category Portal Info -// @version 0.0.4.@@DATETIMEVERSION@@ +// @version 0.0.5.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -35,6 +35,10 @@ window.plugin.showLinkedPortal.handleUpdate = function () { } window.plugin.showLinkedPortal.portalDetail = function (data) { + // don't render linked portal data if portal is neutral. + // (the data can remain sometimes - when a portal decays?) + if (data.portalDetails.controllingTeam.team == 'NEUTRAL') + return; var d = data.portalDetails.portalV2, c = 1;