Skip to content

Commit

Permalink
Merge pull request #100 from MichaelRowden/add_null_checks
Browse files Browse the repository at this point in the history
fix(line-graph): adding extra null checks
  • Loading branch information
tw15egan authored Apr 27, 2018
2 parents 0d7e38b + 9e44f65 commit 3713927
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/LineGraph/LineGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,15 @@ class LineGraph extends Component {
_.max(this.props.datasets.map(d => d.length)) > 2
) {
this.props.onMouseOut();
ReactDOM.unmountComponentAtNode(this.tooltipId);
if (this.tooltipId) {
ReactDOM.unmountComponentAtNode(this.tooltipId);
}
}
}

onMouseMove() {
if (!this.id) return null;

const {
margin,
data,
Expand Down

0 comments on commit 3713927

Please sign in to comment.