Fix crash on beforeunload after failed autojoin

This commit is contained in:
Ivo Julca
2015-07-10 10:04:22 -05:00
parent d2ccb0530a
commit f302205baa

View File

@@ -457,7 +457,7 @@
if (Config.server && Config.server.host === 'localhost') return;
for (var id in self.rooms) {
var room = self.rooms[id];
if (room.requestLeave && !room.requestLeave()) return "You have active battles.";
if (room && room.requestLeave && !room.requestLeave()) return "You have active battles.";
}
});