diff --git a/js/app.js b/js/app.js index ca2df1c6..d1215fa3 100644 --- a/js/app.js +++ b/js/app.js @@ -11,27 +11,6 @@ import ApiUrls from './constants/api_urls'; import routes from './routes'; import fetch from './utils/fetch'; -/* - Taken from - http://stackoverflow.com/questions/30613447/how-to-debug-reactjss-setstate?noredirect=1#comment49301874_30613447 - - - -*/ - -var warn = console.warn; -console.warn = function(warning) { - if (/(setState)/.test(warning)) { - throw new Error(warning); - } - warn.apply(console, arguments); -}; - -/* - - - */ - fetch.defaults({ urlMap: ApiUrls, http: { 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 207eb97e..2cf32139 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 @@ -35,6 +35,7 @@ let PieceListBulkModal = React.createClass({ componentWillUnmount() { EditionListStore.unlisten(this.onChange); + UserStore.unlisten(this.onChange); }, fetchSelectedPieceEditionList() { diff --git a/js/mixins/form_mixin.js b/js/mixins/form_mixin.js index b0d161c8..9f5312fe 100644 --- a/js/mixins/form_mixin.js +++ b/js/mixins/form_mixin.js @@ -19,7 +19,7 @@ export const FormMixin = { this.clearErrors(); fetch .post(this.url(), { body: this.getFormData() }) - .then(response => this.props.handleSuccess()) + .then(() => this.props.handleSuccess()) .catch(this.handleError); },