Skip to content

Commit

Permalink
duplicate WillUnmount method
Browse files Browse the repository at this point in the history
  • Loading branch information
rhalff committed Sep 21, 2016
1 parent 4371ed9 commit 389254d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ export default class TheGraphApp extends Component {
})
}

componentWillUnmount () {
this.autolayouter.destroy()
}

addGraphListeners (graph) {
graph.on('addNode', this.triggerAutolayout)
graph.on('removeNode', this.triggerAutolayout)
Expand Down Expand Up @@ -580,6 +576,8 @@ export default class TheGraphApp extends Component {
let hammertime
const {onNodeSelection, graph} = this.props

this.autolayouter.destroy()

const domNode = findDOMNode(this)

this.removeGraphListeners(graph)
Expand Down

0 comments on commit 389254d

Please sign in to comment.