fix portals-list for portals with no title

fix #789
This commit is contained in:
Jon Atkins 2014-03-31 18:11:26 +01:00
parent a9d58bc646
commit f045cd5714

View File

@ -2,7 +2,7 @@
// @id iitc-plugin-portals-list@teo96 // @id iitc-plugin-portals-list@teo96
// @name IITC plugin: show list of portals // @name IITC plugin: show list of portals
// @category Info // @category Info
// @version 0.1.0.@@DATETIMEVERSION@@ // @version 0.1.1.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@ // @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@ // @downloadURL @@DOWNLOADURL@@
@ -84,8 +84,8 @@ window.plugin.portalslist.getPortals = function() {
'guid': i, 'guid': i,
'teamN': teamN, // TEAM_NONE, TEAM_RES or TEAM_ENL 'teamN': teamN, // TEAM_NONE, TEAM_RES or TEAM_ENL
'team': d.team, // "NEUTRAL", "RESISTANCE" or "ENLIGHTENED" 'team': d.team, // "NEUTRAL", "RESISTANCE" or "ENLIGHTENED"
'name': d.title, 'name': d.title || '(untitled)',
'nameLower': d.title.toLowerCase(), 'nameLower': d.title && d.title.toLowerCase(),
'level': portal.options.level, 'level': portal.options.level,
'health': d.health, 'health': d.health,
'resCount': d.resCount, 'resCount': d.resCount,