소스 검색

only add non-static components to the borrowed_props list

Evan Almloff 2 년 전
부모
커밋
65be035506
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      packages/core/src/scopes.rs

+ 4 - 2
packages/core/src/scopes.rs

@@ -477,8 +477,10 @@ impl<'src> ScopeState {
         let mut props = self.borrowed_props.borrow_mut();
         for node in element.dynamic_nodes {
             if let DynamicNode::Component(comp) = node {
-                let unbounded = unsafe { std::mem::transmute(comp as *const VComponent) };
-                props.push(unbounded);
+                if !comp.static_props {
+                    let unbounded = unsafe { std::mem::transmute(comp as *const VComponent) };
+                    props.push(unbounded);
+                }
             }
         }