Skip to content

Commit

Permalink
fix: duplicated meta content during async rendering (#1352)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj authored Jul 14, 2023
1 parent 6f5da11 commit 4ad2232
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions integrations/utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,12 @@ pub async fn build_async_response(

// in async, we load the meta content *now*, after the suspenses have resolved
let meta = use_context::<MetaContext>(cx);
let head_meta = meta
.as_ref()
.map(|meta| meta.dehydrate())
.unwrap_or_default();
let body_meta = meta
.as_ref()
.and_then(|meta| meta.body.as_string())
.unwrap_or_default();

runtime.dispose();

format!("{head}{head_meta}</head><body{body_meta}>{buf}{tail}")
format!("{head}</head><body{body_meta}>{buf}{tail}")
}

0 comments on commit 4ad2232

Please sign in to comment.