We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8855c0b commit 79e2f9bCopy full SHA for 79e2f9b
src/components/interactive-map.js
@@ -134,14 +134,15 @@ function normalizeEvent(event) {
134
if (event.lngLat || !event.offsetCenter) {
135
return event;
136
}
137
- // https://github.com/visgl/react-map-gl/issues/1449
138
- if (!this.width || !this.height) {
139
- return event;
140
- }
141
142
const {
143
offsetCenter: {x, y}
144
} = event;
+ // https://github.com/visgl/react-map-gl/issues/1449
+ // TODO - fix in mjolnir.js
+ if (!Number.isFinite(x) || !Number.isFinite(y)) {
+ return event;
145
+ }
146
const pos = [x, y];
147
148
const viewport = new WebMercatorViewport(
0 commit comments