solidjs-community / solid-transition-group

SolidJS components for applying animations when children elements enter or leave the DOM.
https://solid-transition-group.netlify.app
MIT License
254 stars 14 forks source link

bug: TransitionGroup assumes that at least two children will be present #24

Closed K4rakara closed 1 year ago

K4rakara commented 1 year ago

On this line, the TransitionGroup component accesses the memo of its children. In the event that props.children is this:

[
  <div></div>,
]

then the memo of its children will resolve to just <div></div> instead of [<div></div>], which causes a type error on the next line, as a div itself is not spreadable.