1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Fixed possible null sub attribute

This commit is contained in:
Uncled1023 2021-06-28 21:33:26 -07:00
parent daa9d65704
commit ff07909d0a

View File

@ -44,7 +44,7 @@ namespace Teknik.Filters
{
string title = (filterContext.Controller as Controller)?.ViewBag?.Title;
string sub = filterContext.RouteData.Values["sub"].ToString();
string sub = filterContext.RouteData.Values["sub"]?.ToString();
if (string.IsNullOrEmpty(sub))
{
sub = request.Host.ToUriComponent().GetSubdomain();