rep: clarify assignment-and-test

pull/2873/head
Rob Pilling 2023-07-13 18:15:08 +01:00
parent e46e2bd5a1
commit 7f0f8cc51a
2 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ var _a, _b, _c;
State.prototype.currentRepIndex = function () {
var elapsed = this.getElapsedTotal();
var ent;
for (var i = 0; ent = reps_1[i]; i++)
for (var i = 0; (ent = reps_1[i]); i++)
if (elapsed < ent.accDur)
return i;
return null;

View File

@ -233,7 +233,7 @@ class State {
currentRepIndex() {
const elapsed = this.getElapsedTotal();
let ent;
for(let i = 0; ent = reps[i]; i++)
for(let i = 0; (ent = reps[i]); i++)
if(elapsed < ent.accDur)
return i;
return null;