Browse Source

feat: allow dynamic nodes to be into dynamic nodes

Jonathan Kelley 2 năm trước cách đây
mục cha
commit
d93eed4c29
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      packages/core/src/nodes.rs

+ 6 - 0
packages/core/src/nodes.rs

@@ -441,6 +441,12 @@ impl<'a> IntoDynNode<'a> for VNode<'a> {
     }
 }
 
+impl<'a> IntoDynNode<'a> for DynamicNode<'a> {
+    fn into_vnode(self, _cx: &'a ScopeState) -> DynamicNode<'a> {
+        self
+    }
+}
+
 // An element that's an error is currently lost into the ether
 impl<'a> IntoDynNode<'a> for Element<'a> {
     fn into_vnode(self, _cx: &'a ScopeState) -> DynamicNode<'a> {