Closed alexpi closed 3 years ago
You're right that that situation wouldn't occur in the app as it is implemented here, but I think it's reasonable for the state update function to handle any valid updates, even if they aren't fired by the code, so I'd prefer to leave it the way it is.
In the
historyUpdateState()
function there is anif (state.done.length == 0) return state;
check. Is this really needed? The undo button becomes disabled as soon as the done array is empty, so this line seems like it would never have any effect.