Removed anchor property and hash is only set if there is anchor

This commit is contained in:
Michael Atwood
2020-06-30 12:49:56 -07:00
parent cb2d529689
commit 5e816ea912
3 changed files with 7 additions and 16 deletions

View File

@ -76,8 +76,8 @@ namespace Oqtane.Shared
: $"{path}",
Query = querystring,
};
var navigateUrl = uriBuilder.Uri.PathAndQuery + "#" + anchor;
anchor = string.IsNullOrEmpty(anchor) ? "" : "#" + anchor;
var navigateUrl = uriBuilder.Uri.PathAndQuery + anchor;
return navigateUrl;
}