Skip to content

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

fix: empty topics can be added in notebook dialog

thecodrrc64869a0af7b
diff --git a/apps/web/src/components/dialogs/add-notebook-dialog.js b/apps/web/src/components/dialogs/add-notebook-dialog.js
index 7797ff50b..50ff92cee 100644
--- a/apps/web/src/components/dialogs/add-notebook-dialog.js
+++ b/apps/web/src/components/dialogs/add-notebook-dialog.js
@@ -31,6 +31,8 @@ class AddNotebookDialog extends React.Component {
}
addTopic(topicTitle) {
+ if (topicTitle.trim().length <= 0) return;
+
const topics = this.state.topics.slice();
topics.push({ title: topicTitle });
this.setState({