Fixed a null in @Library.Wrap check that wasn't short circuiting as intended

This commit is contained in:
agrath
2011-10-16 09:24:14 -13:00
parent a0a2037813
commit 79f4925faf

View File

@@ -231,7 +231,7 @@ namespace umbraco.MacroEngines.Library
public HtmlTagWrapper Wrap(string tag, object inner, object anonymousAttributes, params HtmlTagWrapperBase[] Children)
{
string innerText = null;
if (inner.GetType() != typeof(DynamicNull) && inner != null)
if (inner != null && inner.GetType() != typeof(DynamicNull))
{
innerText = string.Format("{0}", inner);
}
@@ -245,7 +245,7 @@ namespace umbraco.MacroEngines.Library
public HtmlTagWrapper Wrap(string tag, object inner)
{
string innerText = null;
if (inner.GetType() != typeof(DynamicNull) && inner != null)
if (inner != null && inner.GetType() != typeof(DynamicNull))
{
innerText = string.Format("{0}", inner);
}