minor code cleanup and a null check.

This commit is contained in:
Shannon
2014-03-11 17:26:14 +11:00
parent 48bbf1ecb2
commit aed4c1faed
3 changed files with 106 additions and 87 deletions

View File

@@ -331,7 +331,7 @@ namespace Umbraco.Web.Models
var attempt = content.GetType().GetMemberIgnoreCase(content, alias);
return !attempt.Success
return attempt.Success == false || attempt.Result == null
? null
: new PropertyResult(alias, attempt.Result, Guid.Empty, PropertyResultType.ReflectedProperty);
}