diff --git a/Source/Glass.Mapper.Sc/Fields/Link.cs b/Source/Glass.Mapper.Sc/Fields/Link.cs index b2caf19cd..ab9b6608c 100644 --- a/Source/Glass.Mapper.Sc/Fields/Link.cs +++ b/Source/Glass.Mapper.Sc/Fields/Link.cs @@ -80,9 +80,12 @@ public class Link public const string UrlFormat = "{0}{1}"; + public string BuildUrl() + { + return BuildUrl((SafeDictionary)null); + } - - [Obsolete("User the SafeDictionary alternative")] + [Obsolete("Use the SafeDictionary alternative")] public string BuildUrl(NameValueCollection attributes = null) { return BuildUrl(attributes.ToSafeDictionary()); @@ -114,7 +117,7 @@ public string BuildUrl(SafeDictionary attributes = null) var query = getValue("query", () => Query); var anchor = getValue("anchor", () => Anchor); - if (query.IsNotNullOrEmpty()) + if (query.HasValue()) builder.AddToQueryString(query); return UrlFormat.Formatted(builder.ToString(), anchor.IsNullOrEmpty() ? "" : "#" + anchor);