diff --git a/mindplot/src/main/javascript/FixedDistanceBoard.js b/mindplot/src/main/javascript/FixedDistanceBoard.js index a99862c7..db7927c1 100644 --- a/mindplot/src/main/javascript/FixedDistanceBoard.js +++ b/mindplot/src/main/javascript/FixedDistanceBoard.js @@ -81,15 +81,17 @@ mindplot.FixedDistanceBoard.prototype.updateReferencePoint = function() { var entry = entries[i]; - var upperLimit = entry.getUpperLimit() + yOffset; - var lowerLimit = entry.getLowerLimit() + yOffset; - entry.setUpperLimit(upperLimit); - entry.setLowerLimit(lowerLimit); + if(core.Utils.isDefined(entry)){ + var upperLimit = entry.getUpperLimit() + yOffset; + var lowerLimit = entry.getLowerLimit() + yOffset; + entry.setUpperLimit(upperLimit); + entry.setLowerLimit(lowerLimit); - // Fix x position ... - var xPos = this.workoutXBorderDistance(); - entry.setXPosition(xPos); - entry.update(); + // Fix x position ... + var xPos = this.workoutXBorderDistance(); + entry.setXPosition(xPos); + entry.update(); + } } this._referencePoint = parentPosition.clone(); diff --git a/mindplot/src/main/javascript/MindmapDesigner.js b/mindplot/src/main/javascript/MindmapDesigner.js index fbece68c..6043952a 100644 --- a/mindplot/src/main/javascript/MindmapDesigner.js +++ b/mindplot/src/main/javascript/MindmapDesigner.js @@ -574,7 +574,8 @@ mindplot.MindmapDesigner.prototype._nodeModelToNodeGraph = function(nodeModel) for (var i = 0; i < children.length; i++) { var child = children[i]; - this._nodeModelToNodeGraph(children[i]); + if(core.Utils.isDefined(child)) + this._nodeModelToNodeGraph(child); } var workspace = this._workspace;