From 4c07fb12ae63e82271b7d17c50e4a3580ee77b57 Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Wed, 13 Feb 2013 02:49:13 +0100 Subject: [PATCH] properly check if portal details are available --- code/portal_detail_display.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js index 98b33592..703af772 100644 --- a/code/portal_detail_display.js +++ b/code/portal_detail_display.js @@ -4,13 +4,14 @@ // methods that highlight the portal in the map view. window.renderPortalDetails = function(guid) { - var d = window.portals[guid].options.details; - if(!d) { + if(!window.portals[guid]) { unselectOldPortal(); urlPortal = guid; return; } + var d = window.portals[guid].options.details; + var update = selectPortal(guid); // collect some random data that’s not worth to put in an own method