fix 'captured' being set when it should have been 'visited' for link-related messages

fix crash when the selected portal is not in the map data (e.g. while loading), when the highlighter is selected
This commit is contained in:
Jon Atkins 2014-07-23 17:57:13 +01:00
parent cc0802aa6d
commit a28a0737e4

View File

@ -110,7 +110,7 @@ window.plugin.uniques.onPublicChatDataAvailable = function(data) {
&& markup[3][0] == 'TEXT'
&& markup[3][1].plain == ' to '
&& markup[4][0] == 'PORTAL') {
plugin.uniques.setPortalCaptured(markup[2][1].guid);
plugin.uniques.setPortalVisited(markup[2][1].guid);
}
// search for "Your Lx Resonator on y was destroyed by z"
@ -151,7 +151,9 @@ window.plugin.uniques.updateChecked = function() {
$('#visited').prop('checked', visited);
$('#captured').prop('checked', captured);
if (window.plugin.uniques.isHighlightActive) {
plugin.uniques.highlight({portal: portals[guid]});
if (portals[guid]) {
plugin.uniques.highlight({portal: portals[guid]});
}
}
}