Merge pull request #10007 from augmt/fix/loop-protect/do-while

Fix loop-protect for empty lines in do-while loops
This commit is contained in:
Mrugesh Mohapatra
2016-08-12 11:13:37 +05:30
committed by GitHub

View File

@ -358,8 +358,10 @@ if (typeof DEBUG === 'undefined') { DEBUG = true; }
index++; index++;
if (index === line.length && lineNum < (lines.length-1)) { if (index === line.length && lineNum < (lines.length-1)) {
lineNum++; do {
line = lines[lineNum]; lineNum++;
line = lines[lineNum];
} while (line.length === 0);
DEBUG && debug(line); // jshint ignore:line DEBUG && debug(line); // jshint ignore:line
index = 0; index = 0;
} }