Adds unit tests for DynamicNode and DynamicPublishedContent, fixes both when querying for recursive properties.
Fixes: #U4-1839
This commit is contained in:
@@ -637,7 +637,14 @@ namespace Umbraco.Web.Models
|
||||
|
||||
public IPublishedContentProperty GetProperty(string alias)
|
||||
{
|
||||
return GetProperty(alias, false);
|
||||
var prop = GetProperty(alias, false);
|
||||
if (prop == null && alias.StartsWith("_"))
|
||||
{
|
||||
//if it is prefixed and the first result failed, try to get it by recursive
|
||||
var recursiveAlias = alias.Substring(1, alias.Length - 1);
|
||||
return GetProperty(recursiveAlias, true);
|
||||
}
|
||||
return prop;
|
||||
}
|
||||
public IPublishedContentProperty GetProperty(string alias, bool recursive)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user