Fix reloading page when inside a game from trying to rejoin the game twice. Fixes #30, again.
This commit is contained in:
parent
844ce99cdb
commit
7e7be6c54e
|
@ -98,7 +98,6 @@ cah.ajax.after_registered = function() {
|
|||
// Dirty that we have to do this here... Oh well.
|
||||
app_resize();
|
||||
|
||||
if (!cah.ajax.hasAutojoinedGame_) {
|
||||
var hash = window.location.hash.substring(1);
|
||||
if (hash && hash != '') {
|
||||
// TODO find a better place for this if we ever have more than just game=id in the hash.
|
||||
|
@ -114,7 +113,6 @@ cah.ajax.after_registered = function() {
|
|||
cah.ajax.autojoinGameId_ = options['game'];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
cah.ajax.SuccessHandlers[cah.$.AjaxOperation.CHAT] = function(data) {
|
||||
|
@ -138,7 +136,7 @@ cah.ajax.SuccessHandlers[cah.$.AjaxOperation.NAMES] = function(data) {
|
|||
cah.ajax.SuccessHandlers[cah.$.AjaxOperation.GAME_LIST] = function(data) {
|
||||
cah.GameList.instance.processUpdate(data);
|
||||
|
||||
if (cah.ajax.autojoinGameId_) {
|
||||
if (cah.ajax.autojoinGameId_ && !cah.ajax.hasAutojoinedGame_) {
|
||||
try {
|
||||
cah.GameList.instance.joinGame(cah.ajax.autojoinGameId_);
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in New Issue