Merge pull request #4151 from elemoine/modify-assert

Remove bogus assertion
This commit is contained in:
Éric Lemoine
2015-09-23 10:12:07 +02:00
+1 -2
View File
@@ -973,9 +973,8 @@ ol.interaction.Modify.prototype.setGeometryCoordinates_ =
ol.interaction.Modify.prototype.updateSegmentIndices_ = function( ol.interaction.Modify.prototype.updateSegmentIndices_ = function(
geometry, index, depth, delta) { geometry, index, depth, delta) {
this.rBush_.forEachInExtent(geometry.getExtent(), function(segmentDataMatch) { this.rBush_.forEachInExtent(geometry.getExtent(), function(segmentDataMatch) {
goog.asserts.assert(goog.isDef(segmentDataMatch.depth));
if (segmentDataMatch.geometry === geometry && if (segmentDataMatch.geometry === geometry &&
(!goog.isDef(depth) || (!goog.isDef(depth) || !goog.isDef(segmentDataMatch.depth) ||
goog.array.equals(segmentDataMatch.depth, depth)) && goog.array.equals(segmentDataMatch.depth, depth)) &&
segmentDataMatch.index > index) { segmentDataMatch.index > index) {
segmentDataMatch.index += delta; segmentDataMatch.index += delta;