From 957d0c66c934927ac73c3918ee0e1dc1c7ce1a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 1 Oct 2015 11:24:19 +0200 Subject: [PATCH] minor fixes for last commit --- js/components/ascribe_forms/form_login.js | 2 +- js/components/piece_list.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/ascribe_forms/form_login.js b/js/components/ascribe_forms/form_login.js index 2f4f95b7..ddfbfc10 100644 --- a/js/components/ascribe_forms/form_login.js +++ b/js/components/ascribe_forms/form_login.js @@ -57,7 +57,7 @@ let LoginForm = React.createClass({ // if user is already logged in, redirect him to piece list if(this.state.currentUser && this.state.currentUser.email && this.props.redirectOnLoggedIn) { // FIXME: hack to redirect out of the dispatch cycle - window.setTimeout(() => this.history.pushState(null, '/pieces');, 0); + window.setTimeout(() => this.history.pushState(null, '/pieces'), 0); } }, diff --git a/js/components/piece_list.js b/js/components/piece_list.js index 579242c3..62bc61d8 100644 --- a/js/components/piece_list.js +++ b/js/components/piece_list.js @@ -76,7 +76,7 @@ let PieceList = React.createClass({ componentDidUpdate() { if (this.props.redirectTo && this.state.unfilteredPieceListCount === 0) { // FIXME: hack to redirect out of the dispatch cycle - window.setTimeout(() => this.history.pushState(null, this.props.redirectTo, this.props.location.query); + window.setTimeout(() => this.history.pushState(null, this.props.redirectTo, this.props.location.query), 0); } },