Merge pull request #11305 from megawac/avoid-crash-when-interaction-removed
PluggableMap: avoid crash when multiple interactions are removed
This commit is contained in:
@@ -1022,8 +1022,8 @@ class PluggableMap extends BaseObject {
|
||||
}
|
||||
}
|
||||
mapBrowserEvent.frameState = this.frameState_;
|
||||
const interactionsArray = this.getInteractions().getArray();
|
||||
if (this.dispatchEvent(mapBrowserEvent) !== false) {
|
||||
const interactionsArray = this.getInteractions().getArray().slice();
|
||||
for (let i = interactionsArray.length - 1; i >= 0; i--) {
|
||||
const interaction = interactionsArray[i];
|
||||
if (!interaction.getActive()) {
|
||||
|
||||
Reference in New Issue
Block a user