Use replaceState for /connect redirects
This commit is contained in:
parent
d440aac023
commit
deba58dbff
@ -15,7 +15,7 @@ var routeActions = require('./actions/route');
|
||||
|
||||
var uuid = localStorage.uuid;
|
||||
if (!uuid) {
|
||||
routeActions.navigate('connect');
|
||||
routeActions.navigate('connect', true);
|
||||
localStorage.uuid = uuid = util.UUID();
|
||||
}
|
||||
|
||||
|
@ -13,8 +13,12 @@ var App = React.createClass({
|
||||
Reflux.listenTo(routeActions.navigate, 'navigate')
|
||||
],
|
||||
|
||||
navigate: function(path) {
|
||||
this.transitionTo(path);
|
||||
navigate: function(path, replace) {
|
||||
if (!replace) {
|
||||
this.transitionTo(path);
|
||||
} else {
|
||||
this.replaceWith(path);
|
||||
}
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
@ -75,7 +75,7 @@ socket.on('servers', function(data) {
|
||||
window.loaded = true;
|
||||
|
||||
if (data === null) {
|
||||
routeActions.navigate('connect');
|
||||
routeActions.navigate('connect', true);
|
||||
}
|
||||
|
||||
serverActions.load(data);
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user