diff --git a/src/Htmxor/Components/HtmxFragment.cs b/src/Htmxor/Components/HtmxFragment.cs index 6df897d..420570d 100644 --- a/src/Htmxor/Components/HtmxFragment.cs +++ b/src/Htmxor/Components/HtmxFragment.cs @@ -43,5 +43,5 @@ protected override void BuildRenderTree([NotNull] RenderTreeBuilder builder) /// public override bool ShouldOutput([NotNull] HtmxContext context, int directConditionalChildren, int conditionalChildren) => (RenderDuringStandardRequest && context.Request.RoutingMode is RoutingMode.Standard) - || (Match?.Invoke(context.Request) ?? true); + || ((Match?.Invoke(context.Request) ?? true && context.Request.RoutingMode is RoutingMode.Direct)); }