Skip to content

Commit

Permalink
Add server context to suspense resolution (#3552)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Houndie and jkelleyrtp authored Jan 13, 2025
1 parent 25a64d9 commit d5a04c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/fullstack/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d5a04c6

Please sign in to comment.