[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({ const presState = Object.values({
presentations: Object.values({ ...propPresentations,
...presentations, ...presentations,
...propPresentations,
}),
}); });
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) { if (presentations.length > 0) {