Merge pull request #2943 from patrickarlt/expose-global
expose a global if window is present
This commit is contained in:
commit
fdf90c29ba
@ -21,8 +21,9 @@ if (typeof module === 'object' && typeof module.exports === 'object') {
|
|||||||
// define Leaflet as an AMD module
|
// define Leaflet as an AMD module
|
||||||
} else if (typeof define === 'function' && define.amd) {
|
} else if (typeof define === 'function' && define.amd) {
|
||||||
define(L);
|
define(L);
|
||||||
|
}
|
||||||
|
|
||||||
// define Leaflet as a global L variable, saving the original L to restore later if needed
|
// define Leaflet as a global L variable, saving the original L to restore later if needed
|
||||||
} else {
|
if (typeof window !== 'undefined') {
|
||||||
expose();
|
expose();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user