From 8d55e14986f8fb0d82d77de72baa3a7f6bcf3876 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Mon, 9 Dec 2013 13:25:14 +0100 Subject: [PATCH] Safeguard against the case where no features are modifiable --- src/ol/interaction/modifyinteraction.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ol/interaction/modifyinteraction.js b/src/ol/interaction/modifyinteraction.js index 692c0cd74d..f5c4eef831 100644 --- a/src/ol/interaction/modifyinteraction.js +++ b/src/ol/interaction/modifyinteraction.js @@ -252,9 +252,9 @@ ol.interaction.Modify.prototype.removeIndex_ = function(features) { nodesToRemove.push(node); } }); - } - for (i = nodesToRemove.length - 1; i >= 0; --i) { - rBush.remove(nodesToRemove[i]); + for (i = nodesToRemove.length - 1; i >= 0; --i) { + rBush.remove(nodesToRemove[i]); + } } };