Skip to content

Commit 2a76b4f

Browse files
committed
Merge pull request makinacorpus#146 from rukayaj/master
Fixing typeerror (geojson.geometry is undefined)
2 parents 8e61619 + 536f054 commit 2a76b4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

leaflet/static/leaflet/leaflet.forms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ L.FieldStore = L.Class.extend({
3535
}
3636

3737
var geojson = geom.toGeoJSON();
38-
var is_geometrycollection = (geojson.geometry.type == 'GeometryCollection');
38+
var is_geometrycollection = (geojson.geometry && geojson.geometry.type == 'GeometryCollection');
3939
if (is_multi && is_generic && !is_geometrycollection) {
4040
var flat = {type: 'GeometryCollection', geometries: []};
4141
for (var i=0; i < geojson.features.length; i++) {

0 commit comments

Comments
 (0)