Merge pull request #2943 from patrickarlt/expose-global

expose a global if window is present
This commit is contained in:
Patrick Arlt 2014-10-14 15:15:21 -07:00
commit fdf90c29ba

View File

@ -21,8 +21,9 @@ if (typeof module === 'object' && typeof module.exports === 'object') {
// define Leaflet as an AMD module
} else if (typeof define === 'function' && define.amd) {
define(L);
}
// define Leaflet as a global L variable, saving the original L to restore later if needed
} else {
if (typeof window !== 'undefined') {
expose();
}