[issue-14749] - fix downloadable persistence.

This commit is contained in:
Guilherme Leme 2022-04-11 10:26:15 -03:00
parent 3a93898af0
commit 4627e39435

View File

@ -302,12 +302,23 @@ class PresentationUploader extends Component {
}
});
this.setState({
presentations: Object.values({
...presentations,
...propPresentations,
}),
const presState = Object.values({
...propPresentations,
...presentations,
});
const presStateMapped = presState.map((presentation) => {
propPresentations.forEach((propPres) => {
if (propPres.id == presentation.id){
presentation.isCurrent = propPres.isCurrent;
}
})
return presentation;
})
this.setState({
presentations: presStateMapped,
})
}
if (presentations.length > 0) {