mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 09:54:41 -05:00
fix: call additional_context after providing other server context in all cases (#3841)
This commit is contained in:
@@ -352,10 +352,10 @@ pub fn handle_server_fns_with_context(
|
||||
owner
|
||||
.with(|| {
|
||||
ScopedFuture::new(async move {
|
||||
additional_context();
|
||||
provide_context(Request::new(&req));
|
||||
let res_options = ResponseOptions::default();
|
||||
provide_context(res_options.clone());
|
||||
additional_context();
|
||||
|
||||
// store Accepts and Referer in case we need them for redirect (below)
|
||||
let accepts_html = req
|
||||
|
||||
@@ -381,10 +381,10 @@ async fn handle_server_fns_inner(
|
||||
owner
|
||||
.with(|| {
|
||||
ScopedFuture::new(async move {
|
||||
additional_context();
|
||||
provide_context(parts);
|
||||
let res_options = ResponseOptions::default();
|
||||
provide_context(res_options.clone());
|
||||
additional_context();
|
||||
|
||||
// store Accepts and Referer in case we need them for redirect (below)
|
||||
let accepts_html = req
|
||||
@@ -2053,8 +2053,8 @@ where
|
||||
} else {
|
||||
let mut res = handle_response_inner(
|
||||
move || {
|
||||
additional_context();
|
||||
provide_context(state.clone());
|
||||
additional_context();
|
||||
},
|
||||
move || shell(options),
|
||||
req,
|
||||
|
||||
Reference in New Issue
Block a user