A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: make topics optional in importer
Abdullah Attaec76be776c0f
diff --git a/apps/web/src/utils/importer.ts b/apps/web/src/utils/importer.tsindex 734d3c3fd..32c0afd04 100644--- a/apps/web/src/utils/importer.ts+++ b/apps/web/src/utils/importer.ts@@ -116,17 +116,11 @@ async function importNotebook(notebook: Notebook) {if (!nb) {const nbId = await db.notebooks?.add({title: notebook.notebook,- topics: [notebook.topic]+ topics: notebook.topic ? [notebook.topic] : []});nb = db.notebooks?.notebook(nbId).data;}-- let topic = nb?.topics.find((t: any) => t.title === notebook.topic);- if (!topic) {- const topics = db.notebooks?.notebook(nb).topics;- await topics?.add(notebook.topic);- topic = topics?.all.find((t) => t.title === notebook.topic);- }+ const topic = nb?.topics.find((t: any) => t.title === notebook.topic);return { id: nb.id, topic: topic.id };}