fix crash on open topic dialog

This commit is contained in:
ammarahm-ed
2020-03-17 10:36:52 +05:00
parent db419d4c1f
commit 808705c150

View File

@@ -101,9 +101,12 @@ export class DialogManager extends Component {
}; };
showAddTopic = notebook => { showAddTopic = notebook => {
this.setState({ if (notebook) {
item: notebook, this.setState({
}); item: notebook,
});
}
this.addTopicsDialog.open(); this.addTopicsDialog.open();
}; };
@@ -200,7 +203,6 @@ export class DialogManager extends Component {
} else { } else {
this._showSimpleDialog(TEMPLATE_DELETE(this.state.item.type)); this._showSimpleDialog(TEMPLATE_DELETE(this.state.item.type));
} }
break; break;
} }
case 'permanant_delete': { case 'permanant_delete': {