Skip to content

Commit

Permalink
fix: don't overwrite <Html/> props (closes #1828)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsantana authored Oct 2, 2023
1 parent 6d44540 commit a946a01
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 lang.is_some() {
*meta.html.lang.borrow_mut() = lang;
}
if dir.is_some() {
*meta.html.dir.borrow_mut() = dir;
}
if class.is_some() {
*meta.html.class.borrow_mut() = class;
}
meta.html.attributes.borrow_mut().extend(attributes);
} else {
_ = lang;
Expand Down

0 comments on commit a946a01

Please sign in to comment.