Set the 'properties' member to null if the feature has not properties

This commit is contained in:
Frederic Junod
2015-03-12 15:57:11 +01:00
parent da94ee5754
commit 96883e0b69
2 changed files with 8 additions and 0 deletions

View File

@@ -507,6 +507,12 @@ describe('ol.format.GeoJSON', function() {
expect(geojson.features[0].properties.mygeom).to.eql(undefined);
});
it('writes out a feature without properties correctly', function() {
var feature = new ol.Feature(new ol.geom.Point([5, 10]));
var geojson = format.writeFeatureObject(feature);
expect(geojson.properties).to.eql(null);
});
});
describe('#writeGeometry', function() {