diff --git a/src/Framework/Framework/ViewModel/Serialization/ViewModelTypeMetadataSerializer.cs b/src/Framework/Framework/ViewModel/Serialization/ViewModelTypeMetadataSerializer.cs index a7ff234cc3..9cdf4caa1b 100644 --- a/src/Framework/Framework/ViewModel/Serialization/ViewModelTypeMetadataSerializer.cs +++ b/src/Framework/Framework/ViewModel/Serialization/ViewModelTypeMetadataSerializer.cs @@ -105,7 +105,7 @@ private JObject GetEnumTypeMetadataCopy(Type type) private ObjectMetadataWithDependencies GetObjectTypeMetadataCopy(ViewModelSerializationMap map) { var key = new ViewModelSerializationMapWithCulture(map, CultureInfo.CurrentUICulture.Name); - var obj = cachedObjectMetadata.GetOrAdd(key, BuildObjectTypeMetadata(map)); + var obj = cachedObjectMetadata.GetOrAdd(key, _ => BuildObjectTypeMetadata(map)); return new ObjectMetadataWithDependencies((JObject)obj.Metadata.DeepClone(), obj.DependentObjectTypes, obj.DependentEnumTypes); }