mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 14:54:16 +00:00
FIx issues I introduced to SSR while logging this
This commit is contained in:
parent
fefca82d16
commit
c6d30a710a
2 changed files with 5 additions and 1 deletions
|
@ -128,6 +128,8 @@ impl ComponentRepr {
|
|||
let name = name.into();
|
||||
|
||||
let id = HydrationCtx::id();
|
||||
|
||||
#[cfg(all(target_arch = "wasm32", feature = "web"))]
|
||||
gloo::console::warn!("hydrating <", name.to_string(), "/> with id ", id);
|
||||
|
||||
let markers = (
|
||||
|
@ -144,7 +146,6 @@ impl ComponentRepr {
|
|||
// so they can serve as our references when inserting
|
||||
// future nodes
|
||||
if !HydrationCtx::is_hydrating() {
|
||||
gloo::console::warn!(" rendering <{name}/>");
|
||||
#[cfg(debug_assertions)]
|
||||
fragment
|
||||
.append_with_node_2(&markers.1.node, &markers.0.node)
|
||||
|
|
|
@ -647,6 +647,9 @@ macro_rules! generate_html_tags {
|
|||
fn default() -> Self {
|
||||
let id = HydrationCtx::id();
|
||||
|
||||
#[cfg(all(target_arch = "wasm32", feature = "web"))]
|
||||
gloo::console::warn!("hydrating <",stringify!([<$tag:upper>]), "/> with id ", id);
|
||||
|
||||
#[cfg(all(target_arch = "wasm32", feature = "web"))]
|
||||
let element = if HydrationCtx::is_hydrating() {
|
||||
if let Some(el) = crate::document().get_element_by_id(
|
||||
|
|
Loading…
Reference in a new issue