Fix filtered layers if no description is known

This commit is contained in:
pietervdvn 2022-04-26 14:54:01 +02:00
parent 9086713657
commit fe3e73d3a2

View file

@ -92,9 +92,9 @@ export default class FilterView extends VariableUiElement {
if (filteredLayer.layerDef.name === undefined) {
// Name is not defined: we hide this one
return new Toggle(
filteredLayer.layerDef.description.Clone().SetClass("subtle") ,
filteredLayer?.layerDef?.description?.Clone()?.SetClass("subtle") ,
undefined,
state.featureSwitchIsDebugging
state?.featureSwitchIsDebugging
);
}
const iconStyle = "width:1.5rem;height:1.5rem;margin-left:1.25rem;flex-shrink: 0;";