Fix crash in replays

This commit is contained in:
Guangcong Luo
2016-06-17 07:09:10 -04:00
parent 5b83ce1ffe
commit 29ea2b5373

View File

@@ -5977,7 +5977,7 @@ var Battle = (function () {
args.shift();
args.shift();
var message = args.join('|');
var isHighlighted = window.app && app.rooms[this.roomid].getHighlight(message);
var isHighlighted = window.app && app.rooms && app.rooms[this.roomid].getHighlight(message);
var parsedMessage = Tools.parseChatMessage(message, name, '', isHighlighted);
if (!$.isArray(parsedMessage)) parsedMessage = [parsedMessage];
for (var i = 0; i < parsedMessage.length; i++) {