Skip to content

Commit

Permalink
fix: Fix to fire the finishMovePosition state at the end of a feature…
Browse files Browse the repository at this point in the history
… editing (#828)
  • Loading branch information
giuseppe-straziota authored Dec 6, 2022
1 parent c30670f commit 1da3c15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/react-map-gl-draw/src/edit-modes/editing-mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ export default class EditingMode extends BaseMode {
const picked = event.picks && event.picks[0];

// @ts-ignore
if (!picked || !picked.Object || !isNumeric(picked.featureIndex)) {
if (!picked || !picked.object || !isNumeric(picked.featureIndex)) {
return;
}

const pickedObject = picked.object;
switch (pickedObject.type) {
switch (pickedObject.type.toLowerCase()) {
case ELEMENT_TYPE.FEATURE:
case ELEMENT_TYPE.FILL:
case ELEMENT_TYPE.EDIT_HANDLE:
Expand Down

0 comments on commit 1da3c15

Please sign in to comment.