Browse Source

Fix script component src attribute (#2887)

Evan Almloff 10 tháng trước cách đây
mục cha
commit
e5696cd72f
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      packages/html/src/document/head.rs

+ 3 - 0
packages/html/src/document/head.rs

@@ -222,6 +222,9 @@ impl ScriptProps {
         if let Some(r#type) = &self.r#type {
             attributes.push(("type", r#type.clone()));
         }
+        if let Some(src) = &self.src {
+            attributes.push(("src", src.clone()));
+        }
         attributes
     }