diff --git a/src/Leaflet.js b/src/Leaflet.js index 507c781d..14604f42 100644 --- a/src/Leaflet.js +++ b/src/Leaflet.js @@ -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(); }