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:
parent
daa9d65704
commit
ff07909d0a
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user