Closed njons closed 5 years ago
would recommend you test this if you haven't already:
markComplete: (id, prevState) => {
if (!prevState.markSchemeElements[id]) {
throw new Error("element out of range");
}
const markSchemeElements = [...prevState.markSchemeElements];
markSchemeElements[id].completed = !markSchemeElements.completed;
return {
markSchemeElements,
markSchemeCompleted: prevState.markSchemeCompleted + markSchemeElements[id].completed ? 1 : -1
}
}
Codecov Report
50% <ø> (ø)
100% <100%> (ø)
100% <100%> (ø)
Continue to review full report at Codecov.