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 66bb4e3 commit 1bd159cCopy full SHA for 1bd159c
1 file changed
src/Map.js
@@ -301,10 +301,9 @@ export class MapGL extends Evented {
301
}
302
303
_hideLabelUnlessOverOverlay(evt) {
304
- const target = evt && evt.originalEvent && evt.originalEvent.target
+ const target = evt?.originalEvent?.target
305
const isOverOverlay =
306
- target &&
307
- target.closest &&
+ target?.closest &&
308
OVERLAY_SELECTORS.some(sel => target.closest(sel))
309
310
if (!isOverOverlay) {
0 commit comments