From a946a0181da82901c03559ec479565291f979bd3 Mon Sep 17 00:00:00 2001 From: Daniel Santana Date: Mon, 2 Oct 2023 18:46:20 +0100 Subject: [PATCH] fix: don't overwrite `` props (closes #1828) --- meta/src/html.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/meta/src/html.rs b/meta/src/html.rs index 0cca4e3f0e..bcf2310253 100644 --- a/meta/src/html.rs +++ b/meta/src/html.rs @@ -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;