diff --git a/ganttzk/src/main/resources/web/js/ganttz/tasklist.js b/ganttzk/src/main/resources/web/js/ganttz/tasklist.js index b276c27a0..2cd137eb0 100644 --- a/ganttzk/src/main/resources/web/js/ganttz/tasklist.js +++ b/ganttzk/src/main/resources/web/js/ganttz/tasklist.js @@ -725,8 +725,12 @@ zkTaskContainer.legendResize = function(cmp) { var taskdetailsContainer = YAHOO.util.Selector.query('.taskdetailsContainer')[0]; var legendContainer = YAHOO.util.Selector.query('.legend-container')[0]; var legendContainerEarned = YAHOO.util.Selector.query('.legend-container')[1]; - legendContainer.style["width"] = (taskdetailsContainer.clientWidth - LEGEND_CONTAINER_OFFSET )+"px"; - legendContainerEarned.style["width"] = (taskdetailsContainer.clientWidth - LEGEND_CONTAINER_OFFSET )+"px"; + if ( legendContainer != undefined ) { + legendContainer.style["width"] = (taskdetailsContainer.clientWidth - LEGEND_CONTAINER_OFFSET )+"px"; + } + if ( legendContainerEarned != undefined ) { + legendContainerEarned.style["width"] = (taskdetailsContainer.clientWidth - LEGEND_CONTAINER_OFFSET )+"px"; + } };