let ret = document.createDocumentFragment();
let in_tb = false;
+ let i = 0;
if (opt_limit && opt_showlast && pv.length > opt_limit) {
// Truncate the PV at the beginning (instead of at the end).
// We assume here that toplay is 'W'. We also assume that if
} else if (toplay == 'B' && pv.length > 0) {
ret.appendChild(document.createTextNode(move_num + '. … '));
}
- for (let i = 0; i < pv.length; ++i) {
+ for (; i < pv.length; ++i) {
let link = document.createElement('a');
link.className = 'move';
link.setAttribute('id', 'automove' + line_num + '-' + i);