diff --git a/GMO.Umbraco.PropertyHelper/GMO.Umbraco.PropertyHelper.nuspec b/GMO.Umbraco.PropertyHelper/GMO.Umbraco.PropertyHelper.nuspec index bd37675..44dad81 100644 --- a/GMO.Umbraco.PropertyHelper/GMO.Umbraco.PropertyHelper.nuspec +++ b/GMO.Umbraco.PropertyHelper/GMO.Umbraco.PropertyHelper.nuspec @@ -2,7 +2,7 @@ GMO.Umbraco.PropertyHelper - 1.0.0 + 1.1.0 GMO.Umbraco.PropertyHelper Gunnar Már Óttarsson Gunnar Már Óttarsson @@ -11,7 +11,7 @@ https://a-v2.sndcdn.com/assets/images/sc-icons/favicon-2cadd14b.ico false Handles retrieval of various types of property values. - Initial. + IsVortoProperty check added to handle empty vorto properties. Copyright 2017 diff --git a/GMO.Umbraco.PropertyHelper/PropertyHelper.cs b/GMO.Umbraco.PropertyHelper/PropertyHelper.cs index 117619e..ff4e92f 100644 --- a/GMO.Umbraco.PropertyHelper/PropertyHelper.cs +++ b/GMO.Umbraco.PropertyHelper/PropertyHelper.cs @@ -37,7 +37,9 @@ public static object GetValueFromProperty( ) { // Has vorto value returns false for empty vorto properties. - // instead of returning a vorto object with dtdGuid and value null we simply return null val. + // So instead of checking first with hasVortoValue, then returning prop.value of + // a vorto object with dtdGuid and value null we first check IsVortoProperty. + // Then we can return null instead of a useless object. if (IsVortoProperty(content, prop.PropertyTypeAlias)) { if (content.HasVortoValue(prop.PropertyTypeAlias, culture))