Fix a crash in select interaction default styling function when receiving a feature without geometry
This commit is contained in:
1 parent
752b4c6247
commit
f12a407a7d
1 file changed
+3
@@ -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()];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user