diff --git a/ICD.Common.Utils/Extensions/DictionaryExtensions.cs b/ICD.Common.Utils/Extensions/DictionaryExtensions.cs index 3cb4e26..5f29f97 100644 --- a/ICD.Common.Utils/Extensions/DictionaryExtensions.cs +++ b/ICD.Common.Utils/Extensions/DictionaryExtensions.cs @@ -125,8 +125,10 @@ namespace ICD.Common.Utils.Extensions if (key == null) throw new ArgumentNullException("key"); - extends[key] = extends.GetDefault(key, defaultValue); - return extends[key]; + TValue value = extends.GetDefault(key, defaultValue); + extends[key] = value; + + return value; } ///