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: fix all tabs closed on sync when any note is deleted from another device (#9252)
Chloe Olettoaf4dc5e9ea3d
diff --git a/apps/web/src/stores/editor-store.ts b/apps/web/src/stores/editor-store.tsindex 4378eecfb..50344d2e2 100644--- a/apps/web/src/stores/editor-store.ts+++ b/apps/web/src/stores/editor-store.ts@@ -286,14 +286,7 @@ class EditorStore extends BaseStore<EditorStore> {const clearIds: string[] = [];for (const session of sessions) {if (session.type === "new") continue;- const noteId = isDeleted(item)- ? null- : item.type === "note"- ? item.id- : item.type === "tiptap"- ? item.noteId- : null;- if (noteId && session.note.id !== noteId) continue;+ if (session.note.id !== item.id && session.note.contentId !== item.id) continue;if (isDeleted(item) || isTrashItem(item))clearIds.push(session.tabId);// if a note becomes conflicted, reopen the session