Skip to content

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

fix: crash when deleting topics very quickly

thecodrr08f2349b8193
diff --git a/apps/web/src/components/dialogs/add-notebook-dialog.js b/apps/web/src/components/dialogs/add-notebook-dialog.js
index 8d9edcbe5..0b0d8e0ac 100644
--- a/apps/web/src/components/dialogs/add-notebook-dialog.js
+++ b/apps/web/src/components/dialogs/add-notebook-dialog.js
@@ -21,6 +21,7 @@ class AddNotebookDialog extends React.Component {
removeTopic(index) {
const topics = this.state.topics.slice();
+ if (!topics[index]) return;
if (topics[index].id) {
this.deletedTopics.push(topics[index].id);
}