From e3d34ba14e5865b866e949425c20058bf73431ea Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 2 Nov 2023 17:18:11 -0600 Subject: [PATCH] Potentially another fix for the weird umbraco cloud issue. --- src/Articulate/Routing/ArticulateRouteValueTransformer.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Articulate/Routing/ArticulateRouteValueTransformer.cs b/src/Articulate/Routing/ArticulateRouteValueTransformer.cs index d8865e3..86db749 100644 --- a/src/Articulate/Routing/ArticulateRouteValueTransformer.cs +++ b/src/Articulate/Routing/ArticulateRouteValueTransformer.cs @@ -60,12 +60,13 @@ public override async ValueTask 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(); 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; } }