Open JamesLeBoeuf opened 1 year ago
Is there any news about this? One year passed and it is still an issue I am facing.
The issue is that the event.features
should be checked before indexing here.
FWIW changing that alone would prevent the error, but would leave the example short of reproducing the example here, which is the stated intention. To do that, we'd need to add the other layers in interactiveLayerIds
, and actually create the popup.
Description
The clustering example onClick function is returning undefined when clicking outside of clusters and on empty map space.
Expected Behavior
OnClick function to not return undefined.
Steps to Reproduce
Environment
Logs
Uncaught TypeError: Cannot read properties of undefined (reading 'properties') at onClick (component---examples-clusters-src-app-tsx-ae435c98aa31b91df409.js:1:1591) at Map._onPointerEvent (834b8338ea35f2c3d17eb82aef29032efb222d04-d473b88aba9c068a3050.js:1:20732) at Map.fire (27-9fafbe3fd9a64912bea8.js:1:18842) at t._fireEvent (834b8338ea35f2c3d17eb82aef29032efb222d04-d473b88aba9c068a3050.js:1:25834) at Qr.click (27-9fafbe3fd9a64912bea8.js:1:813462) at Rn.handleEvent (27-9fafbe3fd9a64912bea8.js:1:838674)