Skip to content

Commit

Permalink
Potentially another fix for the weird umbraco cloud issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shazwazza committed Nov 2, 2023
1 parent 8adeeaa commit e3d34ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Articulate/Routing/ArticulateRouteValueTransformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ public override async ValueTask<RouteValueDictionary> TransformAsync(HttpContext
{
// This can occur in Umbraco Cloud since some plugin that is used there prevents the UmbracoRouteValues from
// being set the normal way. In this case, we'll need to force route it.
_ = await _umbracoRouteValueTransformer.TransformAsync(httpContext, values);
var routeValues = await _umbracoRouteValueTransformer.TransformAsync(httpContext, values);

umbracoRouteValues = httpContext.Features.Get<UmbracoRouteValues>();
if (umbracoRouteValues == null)
{
throw new InvalidOperationException($"Cannot route, the {nameof(UmbracoRouteValues)} has not been set in the request");
// Most likely will be null
return routeValues;
}
}

Expand Down

0 comments on commit e3d34ba

Please sign in to comment.