fix(frontend): make note details in redux optional

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-09-06 22:18:38 +02:00
parent 118f158ad1
commit 6698450461
50 changed files with 278 additions and 135 deletions

View file

@ -11,5 +11,5 @@ import { useApplicationState } from './use-application-state'
* @return The markdown content of the note
*/
export const useNoteMarkdownContent = (): string => {
return useApplicationState((state) => state.noteDetails.markdownContent.plain)
return useApplicationState((state) => state.noteDetails?.markdownContent.plain ?? '')
}