mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-02 07:42:12 -05:00
Fix crash on beforeunload after failed autojoin
This commit is contained in:
@@ -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.";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user