FilteringFeatureSource can now handle undefined values

This commit is contained in:
pietervdvn 2022-01-18 10:25:11 +01:00
parent 057b4a3192
commit d7f8ff01d5

View file

@ -67,7 +67,7 @@ export default class FilteringFeatureSource implements FeatureSourceForLayer, Ti
const layer = this.upstream.layer;
const features: { feature: any; freshness: Date }[] = (this.upstream.features.data ?? []);
const includedFeatureIds = new Set<string>();
const newFeatures = features.filter((f) => {
const newFeatures = (features ?? []).filter((f) => {
self.registerCallback(f.feature)