Skip to content

Commit

Permalink
Fix TransitionGroup error on quick toggle of components
Browse files Browse the repository at this point in the history
Fix TransitionGroup error on quick toggle of components
  • Loading branch information
scyrizales committed Feb 9, 2017
1 parent 2e03f4b commit 44876b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/TransitionGroup.js
Expand Up @@ -101,7 +101,7 @@ class TransitionGroup extends React.Component {

_handleDoneAppearing = (key) => {
let component = this.childRefs[key];
if (component.componentDidAppear) {
if (component && component.componentDidAppear) {
component.componentDidAppear();
}

Expand Down Expand Up @@ -131,7 +131,7 @@ class TransitionGroup extends React.Component {

_handleDoneEntering = (key) => {
let component = this.childRefs[key];
if (component.componentDidEnter) {
if (component && component.componentDidEnter) {
component.componentDidEnter();
}

Expand Down Expand Up @@ -161,8 +161,8 @@ class TransitionGroup extends React.Component {

_handleDoneLeaving = (key) => {
let component = this.childRefs[key];

if (component.componentDidLeave) {
if (component && component.componentDidLeave) {
component.componentDidLeave();
}

Expand Down

0 comments on commit 44876b6

Please sign in to comment.