Merge pull request #14458 from ramonlsouza/issue-14440

fix: Cannot change presentation download permission twice
This commit is contained in:
Anton Georgiev 2022-02-24 15:28:36 -05:00 committed by GitHub
commit 314e834a8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,12 +301,14 @@ class PresentationUploader extends Component {
}
});
this.setState({
presentations: Object.values({
...presentations,
...propPresentations,
}),
});
if (!_.isEqual(prevProps.presentations, propPresentations) || presentations.length === 0) {
this.setState({
presentations: Object.values({
...presentations,
...propPresentations,
}),
});
}
}
if (presentations.length > 0) {