From e227db1b3be67716df50b03ff9eb9193b828c7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 6 Aug 2015 13:43:53 +0200 Subject: [PATCH] fix create editions for filter widget --- js/components/ascribe_buttons/create_editions_button.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/components/ascribe_buttons/create_editions_button.js b/js/components/ascribe_buttons/create_editions_button.js index 891aa01d..8eebeaf7 100644 --- a/js/components/ascribe_buttons/create_editions_button.js +++ b/js/components/ascribe_buttons/create_editions_button.js @@ -42,18 +42,19 @@ let CreateEditionsButton = React.createClass({ }, startPolling() { - let filterBy = this.state.editionList[this.props.piece.id].filterBy; // start polling until editions are defined let pollingIntervalIndex = setInterval(() => { - EditionListActions.fetchEditionList(this.props.piece.id, null, null, null, null, filterBy) + // requests, will try to merge the filterBy parameter with other parameters (mergeOptions). + // Therefore it can't but null but instead has to be an empty object + EditionListActions.fetchEditionList(this.props.piece.id, null, null, null, null, {}) .then((res) => { clearInterval(this.state.pollingIntervalIndex); this.props.onPollingSuccess(this.props.piece.id, res.editions[0].num_editions); }) - .catch(() => { + .catch((err) => { /* Ignore and keep going */ }); }, 5000);