From 409cdec41164b3c3bebc8477d6efce86f33ab052 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Tue, 28 Jun 2016 04:00:01 -0400 Subject: [PATCH] Fix crash in battles --- js/battle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/battle.js b/js/battle.js index 235da8810..a0bd02a09 100644 --- a/js/battle.js +++ b/js/battle.js @@ -6237,7 +6237,7 @@ var Battle = (function () { // parse the next line if it's a minor: runMinor needs it parsed to determine when to merge minors var nextLine = '', nextArgs = [''], nextKwargs = {}; - nextLine = this.activityQueue[this.activityStep + 1]; + nextLine = this.activityQueue[this.activityStep + 1] || ''; if (nextLine && nextLine.substr(0, 2) === '|-') { nextLine = $.trim(nextLine.substr(1)); nextArgs = nextLine.split('|');