Skip to content

Commit

Permalink
fix: do not warn about hydration if you read a resource in a non-reac…
Browse files Browse the repository at this point in the history
…tive zone
  • Loading branch information
gbj committed Nov 24, 2023
1 parent 414f5fc commit ff576f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion leptos_reactive/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,9 @@ where
}
#[cfg(all(feature = "hydrate", debug_assertions))]
{
if self.serializable != ResourceSerialization::Local {
if self.serializable != ResourceSerialization::Local
&& !SpecialNonReactiveZone::is_inside()
{
crate::macros::debug_warn!(
"At {location}, you are reading a resource in \
`hydrate` mode outside a <Suspense/> or \
Expand Down

0 comments on commit ff576f8

Please sign in to comment.