From 1328976b27f457f8ec2cbba2da161b7ffe5956bd Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Fri, 22 Nov 2024 14:02:26 -0500 Subject: [PATCH] fix release mode --- tachys/src/hydration.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tachys/src/hydration.rs b/tachys/src/hydration.rs index fcca0b0f47..5581fc2d00 100644 --- a/tachys/src/hydration.rs +++ b/tachys/src/hydration.rs @@ -113,7 +113,14 @@ thread_local! { pub(crate) fn set_currently_hydrating( location: Option<&'static Location<'static>>, ) { - CURRENTLY_HYDRATING.set(location); + #[cfg(debug_assertions)] + { + CURRENTLY_HYDRATING.set(location); + } + #[cfg(not(debug_assertions))] + { + _ = location; + } } pub(crate) fn failed_to_cast_element(tag_name: &str, node: Node) -> Element {