Fix: build

This commit is contained in:
Pieter Vander Vennet 2025-01-08 16:56:55 +01:00
parent 3547cb7c92
commit a2782348a7

View file

@ -312,8 +312,8 @@ export default class LayerConfig extends WithContextLoader {
) {
const targetLayerName = filter["sameAs"]
this.filterIsSameAs = targetLayerName
const targetLayer = allLayers.find(l => l.id === targetLayerName)
if(!targetLayer){
const targetLayer = allLayers?.find(l => l.id === targetLayerName)
if (allLayers && !targetLayer) {
throw "Target layer " + targetLayerName + " not found in this theme"
}
filter = targetLayer?.filter