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 {