Skip to content

Commit

Permalink
Check if component is mounted for onTypingDone
Browse files Browse the repository at this point in the history
  • Loading branch information
jstejada committed Oct 29, 2016
1 parent 696a5b0 commit f50798d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Typist.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default class Typist extends Component {
}

onTypingDone = () => {
if (!this.mounted) { return; }
this.setState({ isDone: true });
this.props.onTypingDone();
}
Expand Down

0 comments on commit f50798d

Please sign in to comment.