diff --git a/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.ts b/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.ts index c2df71e3ec..f441bc78ed 100644 --- a/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.ts +++ b/packages/geo/src/lib/style/style-modal/layer/style-modal-layer.component.ts @@ -44,7 +44,7 @@ export class StyleModalLayerComponent implements OnInit { ngOnInit() { this.linestringOnly = true; for (const feature of this.data.layer.ol.getSource().getFeatures()) { - if (feature.getGeometry().getType() !== 'LineString') { + if (feature.getGeometry()?.getType() !== 'LineString') { this.linestringOnly = false; } }