diff --git a/packages/@uppy/informer/src/TransitionGroup.js b/packages/@uppy/informer/src/TransitionGroup.js index cebce0256b..1462a27ed5 100644 --- a/packages/@uppy/informer/src/TransitionGroup.js +++ b/packages/@uppy/informer/src/TransitionGroup.js @@ -264,10 +264,12 @@ class TransitionGroup extends Component { render ({ childFactory, transitionLeave, transitionName, transitionAppear, transitionEnter, transitionLeaveTimeout, transitionEnterTimeout, transitionAppearTimeout, component, ...props }, { children }) { // TODO: we could get rid of the need for the wrapper node // by cloning a single child - const childrenToRender = Object.values(children).filter(Boolean).map(child => { + const childrenToRender = Object.entries(children).map(([key, child]) => { + if (!child) return undefined + const ref = linkRef(this, key); return cloneElement(childFactory(child), { ref, key }) - }) + }).filter(Boolean) return h(component, props, childrenToRender) }