Skip to content

Use global leaflet refactor #330

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sgpinkus
Copy link

Why?:

  • Instead of inject a boolean then doing exactly the same conditional logic in 20 odd components, just do it all in one place.
  • Avoids that injection and refs to WINDOW_OR_GLOBAL in all components, making code clearer.
  • Aside: I believe I observed a race in the wild where WINDOW_OR_GLOBAL.L was referenced in some component's onMounted but LMap.onMounted hadn't set WINDOW_OR_GLOBAL.L yet. onMounted aren't guaranteed to run sequentially or even started sequentially AFAIK. This change solves that too.

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

Successfully merging this pull request may close these issues.

1 participant