Skip to content

Detect Leaflet in local scope#3

Open
alexbrault wants to merge 1 commit into
albburtsev:masterfrom
alexbrault:master
Open

Detect Leaflet in local scope#3
alexbrault wants to merge 1 commit into
albburtsev:masterfrom
alexbrault:master

Conversation

@alexbrault

Copy link
Copy Markdown

When Leaflet is not exposed (e.g. when using Leaflet with RequireJs), window.L is not defined, but Leaflet might be available as plain L in the local scope.
To solve this issue, instead of checking if window has an L member, we can check the type of L to see if it's defined

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