close permalink on delete of focused post ID (#1757)

This commit is contained in:
Saturnino Abril 2018-06-12 05:26:50 +08:00 committed by Elias Nahum
parent b259ebbb18
commit 0bb21f5374

View file

@ -109,6 +109,10 @@ export default class Permalink extends PureComponent {
}
componentWillReceiveProps(nextProps) {
if (nextProps.channelId === '') {
this.handleClose();
}
if (this.props.channelName !== nextProps.channelName) {
this.setState({title: nextProps.channelName});
}