From f0038465cc9d288d0bc3cff7098e8e19d10b5382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 31 Dec 2012 21:45:30 +0100 Subject: [PATCH] Fix clearing of removed segments. --- src/path/Path.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/path/Path.js b/src/path/Path.js index 760cedc4..c753333d 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -530,8 +530,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{ * path.selected = true; */ removeSegment: function(index) { - var segments = this.removeSegments(index, index + 1); - return segments[0] || null; + return this.removeSegments(index, index + 1)[0] || null; }, /** @@ -579,7 +578,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{ if (segment._selectionState) this._updateSelection(segment, segment._selectionState, 0); // Clear the indices and path references of the removed segments - removed._index = removed._path = undefined; + segment._index = segment._path = undefined; } // Adjust the indices of the segments above. for (var i = from, l = segments.length; i < l; i++)