Properly support new battle ID style

This commit is contained in:
Cathy J. Fitzpatrick
2013-04-07 06:03:01 +04:00
parent 41027e9b8d
commit 6dfc6924cc

View File

@@ -1787,7 +1787,7 @@ function Lobby(id, elem) {
};
this.mainTopState = '';
this.parseBattleID = function (id) {
if (id.indexOf('-') > 6) {
if (id.lastIndexOf('-') > 6) {
return id.match(/^battle\-([a-z0-9]*)\-?[0-9]*$/);
}
return id.match(/^battle\-([a-z0-9]*[a-z])[0-9]*$/);