Skip to content

Commit

Permalink
Merge pull request #15 from scyrizales/ISSUE-12
Browse files Browse the repository at this point in the history
Fix TransitionGroup error on quick toggle of components
  • Loading branch information
jquense authored Feb 9, 2017
2 parents 2e03f4b + 44876b6 commit de38b24
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/TransitionGroup.js
Original file line number Diff line number Diff line change
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 de38b24

Please sign in to comment.