Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix crash on open topic dialog

ammarahm-ed808705c150a0
diff --git a/apps/mobile/src/components/DialogManager/index.js b/apps/mobile/src/components/DialogManager/index.js
index 6c1dd7f04..71ee6bc5a 100644
--- a/apps/mobile/src/components/DialogManager/index.js
+++ b/apps/mobile/src/components/DialogManager/index.js
@@ -101,9 +101,12 @@ export class DialogManager extends Component {
};
showAddTopic = notebook => {
- this.setState({
- item: notebook,
- });
+ if (notebook) {
+ this.setState({
+ item: notebook,
+ });
+ }
+
this.addTopicsDialog.open();
};
@@ -200,7 +203,6 @@ export class DialogManager extends Component {
} else {
this._showSimpleDialog(TEMPLATE_DELETE(this.state.item.type));
}
-
break;
}
case 'permanant_delete': {