diff --git a/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js b/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js index 70391e2d..f40587cb 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js +++ b/js/components/ascribe_accordion_list/accordion_list_item_table_editions.js @@ -42,7 +42,7 @@ let AccordionListItemTableEditions = React.createClass({ EditionListStore.listen(this.onChange); }, - componentDidUnmount() { + componentWillUnmount() { EditionListStore.unlisten(this.onChange); }, diff --git a/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js b/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js index 75695058..280af762 100644 --- a/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js +++ b/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js @@ -31,7 +31,7 @@ let PieceListBulkModal = React.createClass({ UserStore.listen(this.onChange); }, - componentDidUnmount() { + componentWillUnmount() { EditionListStore.unlisten(this.onChange); UserStore.unlisten(this.onChange); }, diff --git a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js index ce9150b1..84681b55 100644 --- a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js +++ b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js @@ -22,7 +22,7 @@ let PieceListToolbar = React.createClass({ PieceListStore.listen(this.onChange); }, - componentDidUnmount() { + componentWillUnmount() { PieceListStore.unlisten(this.onChange); }, diff --git a/js/components/edition_container.js b/js/components/edition_container.js index 7b8b6151..8a2a8487 100644 --- a/js/components/edition_container.js +++ b/js/components/edition_container.js @@ -29,7 +29,7 @@ let EditionContainer = React.createClass({ UserActions.fetchCurrentUser(); EditionActions.fetchOne(this.props.params.editionId); }, - componentDidUnmount() { + componentWillUnmount() { EditionStore.unlisten(this.onChange); UserStore.unlisten(this.onChange); }, diff --git a/js/components/header.js b/js/components/header.js index 1c0116db..a53b628e 100644 --- a/js/components/header.js +++ b/js/components/header.js @@ -26,7 +26,7 @@ let Header = React.createClass({ UserActions.fetchCurrentUser(); }, - componentDidUnmount() { + componentWillUnmount() { UserStore.unlisten(this.onChange); }, diff --git a/js/components/piece_list.js b/js/components/piece_list.js index 9d6ad26e..e6735a27 100644 --- a/js/components/piece_list.js +++ b/js/components/piece_list.js @@ -26,7 +26,7 @@ let PieceList = React.createClass({ PieceListActions.fetchPieceList(page, this.state.pageSize, this.state.search, this.state.orderBy, this.state.orderAsc); }, - componentDidUnmount() { + componentWillUnmount() { PieceListStore.unlisten(this.onChange); },