Skip to content

Commit

Permalink
[Bug] Fix mouse event evt.point evt.lngLat undefined crash (#1903)
Browse files Browse the repository at this point in the history
Signed-off-by: Shan He <heshan0131@gmail.com>

Co-authored-by: Shan He <heshan0131@gmail.com>
  • Loading branch information
jwasilgeo and heshan0131 committed Aug 4, 2022
1 parent 39427d4 commit d31fe64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reducers/vis-state-updaters.ts
Expand Up @@ -1687,8 +1687,8 @@ export const mouseMoveUpdater = (
...state,
mousePos: {
...state.mousePos,
mousePosition: [...evt.point],
coordinate: [...evt.lngLat]
...(Array.isArray(evt.point) ? {mousePosition: [...evt.point]} : {}),
...(Array.isArray(evt.lngLat) ? {coordinate: [...evt.lngLat]} : {})
}
};
}
Expand Down

0 comments on commit d31fe64

Please sign in to comment.