mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Returning the default value even when the element is found, but not the attribute itself.
This change fixes the issue of a default page size of 0 when setting up a new site.
This commit is contained in:
@@ -20,7 +20,8 @@ namespace Orchard.ContentManagement {
|
||||
? null
|
||||
: (versioned ? infosetPart.VersionInfoset.Element : infosetPart.Infoset.Element)
|
||||
.Element(contentPart.GetType().Name);
|
||||
return el == null ? defaultValue : el.Attr<TProperty>(name);
|
||||
var attr = el != null ? el.Attribute(name) : default(XAttribute);
|
||||
return attr == null ? defaultValue : XmlHelper.Parse<TProperty>(attr.Value);
|
||||
}
|
||||
|
||||
public static TProperty Retrieve<TProperty>(this ContentPart contentPart, string name,
|
||||
|
||||
Reference in New Issue
Block a user