Fix select on hover ( null ref)
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma 2020-02-14 10:21:49 +01:00
parent 52b4f90b78
commit 81ed89b240

View File

@ -67,6 +67,9 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
} else { } else {
evaluatedStyle = this.stylesCache["selected"]; evaluatedStyle = this.stylesCache["selected"];
} }
if(evaluatedStyle && evaluatedStyle.geometry_ == null) {
evaluatedStyle.setGeometry((feature) => this.geometry(feature));
}
return evaluatedStyle return evaluatedStyle
} }
@ -135,7 +138,7 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
} else { } else {
evaluatedStyle = styleEntry; evaluatedStyle = styleEntry;
} }
if(evaluatedStyle.geometry_ == null) { if(evaluatedStyle && evaluatedStyle.geometry_ == null) {
evaluatedStyle.setGeometry((feature) => this.geometry(feature)); evaluatedStyle.setGeometry((feature) => this.geometry(feature));
} }
return evaluatedStyle; return evaluatedStyle;