From 377c411143c577752014842bbc205093c9ebfdc4 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 5 May 2023 00:59:43 +0200 Subject: [PATCH] Fix: init indexedFeatureStore with a default map as to fix crash upon loading if a pending change is present --- Logic/FeatureSource/Sources/FeatureSourceMerger.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Logic/FeatureSource/Sources/FeatureSourceMerger.ts b/Logic/FeatureSource/Sources/FeatureSourceMerger.ts index 52121ada2c..87b011edd4 100644 --- a/Logic/FeatureSource/Sources/FeatureSourceMerger.ts +++ b/Logic/FeatureSource/Sources/FeatureSourceMerger.ts @@ -16,7 +16,7 @@ export default class FeatureSourceMerger implements IndexedFeatureSource { * In case that multiple features have the same id, the latest `_version_number` will be used. Otherwise, we will take the last one */ constructor(...sources: FeatureSource[]) { - this._featuresById = new UIEventSource>(undefined) + this._featuresById = new UIEventSource>(new Map()) this.featuresById = this._featuresById const self = this sources = Utils.NoNull(sources)