Skip to content

Commit

Permalink
fix(View): fix pickCoordinates undefined parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mgermerie authored and gchoqueux committed Mar 7, 2022
1 parent a0195c6 commit 0ec49f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/View.js
Expand Up @@ -1055,7 +1055,7 @@ class View extends THREE.EventDispatcher {
pickCoordinates(mouse, target = new Coordinates(this.tileLayer.extent.crs)) {
if (mouse instanceof Event) {
this.eventToViewCoords(mouse);
} else if (mouse.x !== undefined && mouse.y !== undefined) {
} else if (mouse && mouse.x !== undefined && mouse.y !== undefined) {
_eventCoords.copy(mouse);
} else {
_eventCoords.set(
Expand Down

0 comments on commit 0ec49f4

Please sign in to comment.