Skip to content

Commit

Permalink
Fixes #1828, making SSR behavior match the Hydrate behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsantana committed Oct 2, 2023
1 parent 6d44540 commit 1ee9b73
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions meta/src/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,15 @@ pub fn Html(
}
} else if #[cfg(feature = "ssr")] {
let meta = crate::use_head();
*meta.html.lang.borrow_mut() = lang;
*meta.html.dir.borrow_mut() = dir;
*meta.html.class.borrow_mut() = class;
if let Some(lang) = lang {
*meta.html.lang.borrow_mut() = lang;
}
if let Some(dir) = dir {
*meta.html.dir.borrow_mut() = dir;
}
if let Some(class) = class {
*meta.html.class.borrow_mut() = class;
}
meta.html.attributes.borrow_mut().extend(attributes);
} else {
_ = lang;
Expand Down

0 comments on commit 1ee9b73

Please sign in to comment.