UmbracoMapper shouldn't throw an exception when trying to map a source property being null.

This commit is contained in:
Claus
2019-06-26 23:10:46 +02:00
parent 8831860174
commit 975816ddd7
2 changed files with 48 additions and 2 deletions

View File

@@ -191,7 +191,7 @@ namespace Umbraco.Core.Mapping
private TTarget Map<TTarget>(object source, Type sourceType, MapperContext context)
{
if (source == null)
throw new ArgumentNullException(nameof(source));
return default;
var targetType = typeof(TTarget);