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
core: remove note content if history item has no content
Abdullah Atta2b0e5c41c8d3
diff --git a/packages/core/src/collections/note-history.ts b/packages/core/src/collections/note-history.tsindex 0ebff07c4..18ca7ebb6 100644--- a/packages/core/src/collections/note-history.ts+++ b/packages/core/src/collections/note-history.ts@@ -206,10 +206,7 @@ export class NoteHistory implements ICollection {title: content.title});}- } else if (- (content.data && content.type && !isCipher(content.data)) ||- content.title- ) {+ } else {const note: Partial<Note & {content: NoteContent<false>;@@ -220,12 +217,13 @@ export class NoteHistory implements ICollection {sessionId: `${Date.now()}`};- if (content.data && content.type && !isCipher(content.data)) {- note.content = {- data: content.data,- type: content.type- };- }+ note.content =+ content.data && content.type && !isCipher(content.data)+ ? {+ data: content.data,+ type: content.type+ }+ : { data: "<p></p>", type: "tiptap" };if (content.title) {note.title = content.title;