mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
minor fixes for last commit
This commit is contained in:
parent
829f2c592b
commit
957d0c66c9
@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user