Browse Source

Add server context to suspense resolution (#3552)

* Add server context to suspense resolution

While this was done correctly in the streaming case, non-streaming
suspense resolution didn't recieve the server context.  This meant that
anything that required the context after the point of suspension would
find it missing.

* fmt

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
James Benze 5 tháng trước cách đây
mục cha
commit
d5a04c69ba
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      packages/fullstack/src/render.rs

+ 2 - 1
packages/fullstack/src/render.rs

@@ -221,7 +221,8 @@ impl SsrRendererPool {
             // If streaming is disabled, wait for the virtual dom to finish all suspense work
             // before rendering anything
             if streaming_mode == StreamingMode::Disabled {
-                virtual_dom.wait_for_suspense().await;
+                ProvideServerContext::new(virtual_dom.wait_for_suspense(), server_context.clone())
+                    .await
             }
 
             // Render the initial frame with loading placeholders