Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress errors in Snapping.js #1456

Closed
wants to merge 1 commit into from

Conversation

tanthammar
Copy link

@tanthammar tanthammar commented Feb 16, 2024

On mouse-over, markers, L.Divicons or sometimes layer groups,
with a tool active,
I get errors in console where this._snapList is undefined.

It originates from events dispatched from Leaflet when tooltips are opened/closed.

This error sometimes breaks Geoman and I have to reload the page to continue.

A simple solution is to check the _snapList property.

This non-breaking change, solves the problem.

@Falke-Design
Copy link
Collaborator

Thank you for your contribution but before I will merge this, I need a reproducable example when this happens.

I haven't found a situation where this._snapList can be undefined when _handleSnapLayerRemoval is called. Do you have a custom implementation? Do you use a Framework?

Please describe step by step how I can reproduce this error. And please create a demo: https://jsfiddle.net/wv9hz6ec/

@tanthammar
Copy link
Author

tanthammar commented Feb 19, 2024

@Falke-Design I do understand that you want me to reproduce the error.
I use TALL-stack. Laravel, Alpine js, Livewire, Tailwind.
The task is too big for me to setup a demo.
I have made a fork where I added the change.
Thank you for replying and for maintaining this awesome tool!
Apologies for not going all the way with reproducing the error for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants