fix: don't deselect active note if in user created view (#1081)

* fix: don't deselect active note if in user created view

* fix: typo

* feat: add utility functions

fix: mobx warning

* fix: react crash

* fix: tag change selection

* feat: add item reload source
This commit is contained in:
Aman Harwara
2022-06-10 18:11:40 +05:30
committed by GitHub
parent a3cb45b413
commit 2ecfcdecb4
7 changed files with 52 additions and 39 deletions

View File

@@ -196,7 +196,7 @@ const NotesOptions = ({
const unpinned = notes.some((note) => !note.pinned)
const editorForNote = useMemo(
() => application.componentManager.editorForNote(notes[0]),
() => (notes[0] ? application.componentManager.editorForNote(notes[0]) : undefined),
[application.componentManager, notes],
)