diff --git a/src/client/spark_core/Collections/Extensions/DictionaryExtensions.cs b/src/client/spark_core/Collections/Extensions/DictionaryExtensions.cs index ed8cb4315..33f67b839 100644 --- a/src/client/spark_core/Collections/Extensions/DictionaryExtensions.cs +++ b/src/client/spark_core/Collections/Extensions/DictionaryExtensions.cs @@ -12,7 +12,7 @@ namespace System.Collections.Generic { public static void AddOrUpdate(this IDictionary dictionary, TKey key, Func add_value_factory, Func update_value) { if (!dictionary.TryGetValue(key, out TValue value)) dictionary.Add(key, add_value_factory(key)); - dictionary[key] = update_value(key, value); + else dictionary[key] = update_value(key, value); } public static TValue GetOrAdd(this IDictionary dictionary, TKey key, Func add_value_factory) {