Fix a crash in select interaction default styling function when receiving a feature without geometry

This commit is contained in:
Francois Blackburn
2016-06-08 08:56:14 -04:00
parent 752b4c6247
commit f12a407a7d

View File

@@ -301,6 +301,9 @@ ol.interaction.Select.getDefaultStyleFunction = function() {
styles[ol.geom.GeometryType.LINE_STRING]);
return function(feature, resolution) {
if (!feature.getGeometry()) {
return null;
}
return styles[feature.getGeometry().getType()];
};
};