[FIX] incomplete tests not deleted properly
Ensure tests are deleted from state instead of stored as undefined
This commit is contained in:
@@ -130,7 +130,7 @@ export default class History extends Component {
|
|||||||
let newState = {
|
let newState = {
|
||||||
progressHistoryIncomplete: this.state.progressHistoryIncomplete,
|
progressHistoryIncomplete: this.state.progressHistoryIncomplete,
|
||||||
};
|
};
|
||||||
delete newState.progressHistoryIncomplete[progressIndex];
|
newState.progressHistoryIncomplete.splice(progressIndex, 1);
|
||||||
this.setState(newState);
|
this.setState(newState);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ export default withRouter(class LoggedInHome extends React.Component {
|
|||||||
let newState = {
|
let newState = {
|
||||||
progressHistoryIncomplete: this.state.progressHistoryIncomplete,
|
progressHistoryIncomplete: this.state.progressHistoryIncomplete,
|
||||||
};
|
};
|
||||||
delete newState.progressHistoryIncomplete[progressIndex];
|
newState.progressHistoryIncomplete.splice(progressIndex, 1);
|
||||||
this.setState(newState);
|
this.setState(newState);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user