Merge pull request #4521 from Tainan404/fix-presenter-modal-bug

[HTML5] Fix presentation upload modal  bug
This commit is contained in:
Anton Georgiev 2017-10-24 17:02:47 -02:00 committed by GitHub
commit 967be17440

View File

@ -39,6 +39,14 @@ class ActionsDropdown extends Component {
this.handlePresentationClick = this.handlePresentationClick.bind(this);
}
componentWillUpdate(nextProps) {
const { isUserPresenter: isPresenter } = nextProps;
const { isUserPresenter: wasPresenter, mountModal } = this.props;
if (wasPresenter && !isPresenter) {
mountModal(null);
}
}
handlePresentationClick() {
this.props.mountModal(<PresentationUploaderContainer />);
}