From d7f8ff01d511449cac876de0f3e0d9d2f31b9034 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 18 Jan 2022 10:25:11 +0100 Subject: [PATCH] FilteringFeatureSource can now handle undefined values --- Logic/FeatureSource/Sources/FilteringFeatureSource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Logic/FeatureSource/Sources/FilteringFeatureSource.ts b/Logic/FeatureSource/Sources/FilteringFeatureSource.ts index 3ae3ff053..125018406 100644 --- a/Logic/FeatureSource/Sources/FilteringFeatureSource.ts +++ b/Logic/FeatureSource/Sources/FilteringFeatureSource.ts @@ -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(); - const newFeatures = features.filter((f) => { + const newFeatures = (features ?? []).filter((f) => { self.registerCallback(f.feature)