Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Fix exception when number of children reduces in transition #344

Merged
merged 1 commit into from
Mar 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix exception when number of children reduces in transition
  • Loading branch information
set committed Mar 22, 2018
commit 0477ab4c5a9186d61aa1d790e204cb92a51354cc
2 changes: 1 addition & 1 deletion src/victory-util/transitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function getInitialTransitionState(oldChildren, nextChildren) {

const getTransitionsFromChildren = (old, next) => {
return old.map((child, idx) => {
if (child && child.props && child.props.children) {
if (child && child.props && child.props.children && next[idx]) {
return getTransitionsFromChildren(
React.Children.toArray(old[idx].props.children),
React.Children.toArray(next[idx].props.children)
Expand Down