Update PLUGIN-GUIDE.md

whitespace in plugin example
This commit is contained in:
Jan Pieter Waagmeester 2015-02-26 15:58:22 +01:00
parent 05f8011a37
commit 4e21a3b54b

View File

@ -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 = {};