Type fixes and simplifications

This commit is contained in:
Andreas Hocevar
2016-01-20 10:14:09 +01:00
committed by Nicholas L
parent d81af7594c
commit 2fb33ba940
2 changed files with 16 additions and 26 deletions

View File

@@ -999,9 +999,7 @@ ol.interaction.Modify.prototype.updateSegmentIndices_ = function(
this.rBush_.forEachInExtent(geometry.getExtent(), function(segmentDataMatch) {
if (segmentDataMatch.geometry === geometry &&
(depth === undefined || segmentDataMatch.depth === undefined ||
ol.array.equals(
/** @type {null|{length: number}} */ (segmentDataMatch.depth),
depth)) &&
ol.array.equals(segmentDataMatch.depth, depth)) &&
segmentDataMatch.index > index) {
segmentDataMatch.index += delta;
}