From bd3c93741ac29754afcf631d759152e28e0fd8d0 Mon Sep 17 00:00:00 2001 From: johndoe Date: Fri, 18 Oct 2019 18:33:04 +0300 Subject: [PATCH] portals-list: filter out portal without real data (bug in intel) Portals with empty title causes exception when sorting Anyway, table rows filled with are not useful --- plugins/portals-list.user.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/portals-list.user.js b/plugins/portals-list.user.js index cde5cbccc..b78eda9f3 100644 --- a/plugins/portals-list.user.js +++ b/plugins/portals-list.user.js @@ -154,6 +154,14 @@ window.plugin.portalslist.getPortals = function() { // eliminate offscreen portals (selected, and in padding) if(!displayBounds.contains(portal.getLatLng())) return true; + if (!portal.options.data.title) { // no data about portal + // bug in intel, observed with ghost fields + // todo: check if such portal is really duplicate + // otherwise better keep it (with data filled by some defaults) + console.warn('filtering out "ghost" portal:', portal.options.data); + return true; + } + retval=true; switch (portal.options.team) {