Ensure that the builder isn't too long
continuous-integration/drone/push Build is passing Details

main
Clément FRÉVILLE 1 year ago
parent 8b8d424011
commit 03c4f786f7

@ -37,7 +37,9 @@ function composeDigit(digit) {
clearTimeout(taskId);
taskId = null;
}
builder += digit.toString();
if (builder.length < CODE.length) {
builder += digit.toString();
}
display.innerText = builder + '_'.repeat(CODE.length - builder.length);
light.classList.remove(IS_SUCCESS, IS_ERROR);
if (CODE.startsWith(builder)) {

Loading…
Cancel
Save