diff --git a/PLUGIN-GUIDE.md b/PLUGIN-GUIDE.md index f7c35116c..742583d00 100644 --- a/PLUGIN-GUIDE.md +++ b/PLUGIN-GUIDE.md @@ -168,12 +168,11 @@ You can add support for AMD/CommonJS loaders to your Leaflet plugin by following // define a Common JS module that relies on 'leaflet' } else if (typeof exports === 'object') { module.exports = factory(require('leaflet')); - } // attach your plugin to the global 'L' variable - if(typeof window !== 'undefined' && window.L){ - window.L.YourPlugin = factory(L); + if (typeof window !== 'undefined' && window.L) { + window.L.YourPlugin = factory(L); } }(function (L) { var MyLeafletPlugin = {};