Fix broken undo button

Reporter below

Co-authored-by: Fabian Wunsch <fabian@uriah.heep.sax.de>
This commit is contained in:
Hans5958 2022-04-14 18:23:06 +07:00
parent a13b9b2a3a
commit 14f1ec4afa

View file

@ -628,7 +628,8 @@ function updatePath(newPath = path) {
path = newPath path = newPath
render(path) render(path)
finishButton.disabled = path.length; finishButton.disabled = path.length;
undoButton.disabled = path.length == 1; // Maybe make it undo the cancel action in the future undoButton.disabled = path.length == 0; // Maybe make it undo the cancel action in the future
undoHistory = []
// TODO: Able to click finish when one period has it. // TODO: Able to click finish when one period has it.
finishButton.disabled = path.length < 3; finishButton.disabled = path.length < 3;
} }