Skip to content

Commit

Permalink
Merge pull request #77 from DISID/geojson-empty-constructor
Browse files Browse the repository at this point in the history
Fix GeoJSON.initialize when no data
  • Loading branch information
Peter Thorin committed Apr 22, 2015
2 parents d969345 + 04cdbc3 commit 42aa678
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/proj4leaflet.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@
initialize: function(geojson, options) {
this._callLevel = 0;
L.GeoJSON.prototype.initialize.call(this, null, options);
this.addData(geojson);
if (geojson) {
this.addData(geojson);
}
},

addData: function(geojson) {
Expand Down

0 comments on commit 42aa678

Please sign in to comment.