8c8075a616e1438b1644ccba401dfb376ab2b2b6 larrym Thu Sep 16 10:51:55 2010 -0700 check for null trackDbJson in makeMapItem to fix errors in console logs when CONTEXT_MENU is turned off diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 93e08b8..96ecebe 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -1351,6 +1351,7 @@ function makeMapItem(id) { // Create a dummy mapItem on the fly (for objects that don't have corresponding entry in the map). + if(typeof(trackDbJson) != "undefined" && trackDbJson != null) { var title; var rec = trackDbJson[id]; if(rec) { @@ -1359,15 +1360,20 @@ title = id; } return {id: id, title: "configure " + title}; + } else { + return null; + } } function mapItemMouseOver(obj) { // Record data for current map area item currentMapItem = makeMapItem(obj.id); + if(currentMapItem != null) { currentMapItem.href = obj.href; currentMapItem.title = obj.title; } +} function mapItemMouseOut(obj) {