Merge branch 'netcore/task/Surface-Routing-9717' of https://github.com/umbraco/Umbraco-CMS into netcore/task/Surface-Routing-9717

This commit is contained in:
Shannon
2021-02-05 13:14:40 +11:00
3 changed files with 3 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ namespace Umbraco.Web.Common.Extensions
pattern.Append('/').Append(controllerName);
}
pattern.Append('/').Append("{action}/{id?}");
pattern.Append("/{action}/{id?}");
var defaults = defaultAction.IsNullOrWhiteSpace()
? (object)new { controller = controllerName }

View File

@@ -31,7 +31,7 @@ namespace Umbraco.Web.Common.ModelBinders
// in the aspnet pipeline it will really only support converting from IPublishedContent which is contained
// in the UmbracoRouteValues --> IContentModel
UmbracoRouteValues umbracoRouteValues = bindingContext.HttpContext.Features.Get<UmbracoRouteValues>();
if (umbracoRouteValues == null)
if (umbracoRouteValues is null)
{
return Task.CompletedTask;
}

View File

@@ -41,7 +41,7 @@ namespace Umbraco.Web.Website.Controllers
get
{
UmbracoRouteValues umbracoRouteValues = HttpContext.Features.Get<UmbracoRouteValues>();
if (umbracoRouteValues == null)
if (umbracoRouteValues is null)
{
throw new InvalidOperationException($"No {nameof(UmbracoRouteValues)} feature was found in the HttpContext");
}