minor fixes for last commit

This commit is contained in:
Tim Daubenschütz 2015-10-01 11:24:19 +02:00
parent 829f2c592b
commit 957d0c66c9
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}
},

View File

@ -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);
}
},