From a8a866a7fec063c69d919132fbb5b7fc59da3377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Denuzi=C3=A8re?= Date: Fri, 3 Nov 2023 16:56:42 +0100 Subject: [PATCH] [#329] Don't use RenderMode.WebAssembly --- src/Bolero.Server/Components.fs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Bolero.Server/Components.fs b/src/Bolero.Server/Components.fs index 0117ccc5..3d30f48a 100644 --- a/src/Bolero.Server/Components.fs +++ b/src/Bolero.Server/Components.fs @@ -65,13 +65,11 @@ module Rendering = let private emptyContent = Task.FromResult { new IHtmlContent with member _.WriteTo(_, _) = () } let internal renderComponentAsync (html: IHtmlHelper) (componentType: Type) (config: IBoleroHostConfig) (parameters: obj) = - let mode = - match config.IsServer, config.IsPrerendered with - | true, true -> RenderMode.ServerPrerendered - | true, false -> RenderMode.Server - | false, true -> RenderMode.WebAssemblyPrerendered - | false, false -> RenderMode.WebAssembly - html.RenderComponentAsync(componentType, mode, parameters) + match config.IsServer, config.IsPrerendered with + | true, true -> html.RenderComponentAsync(componentType, RenderMode.ServerPrerendered, parameters) + | true, false -> html.RenderComponentAsync(componentType, RenderMode.Server, parameters) + | false, true -> html.RenderComponentAsync(componentType, RenderMode.Static, parameters) + | false, false -> emptyContent type [] RenderType = | FromConfig of IBoleroHostConfig