From b5fcfdecf65b4b39d0c07c7b3692f94b712f1095 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sun, 26 Nov 2023 10:35:44 +0100 Subject: [PATCH] linting --- src/hooks/useNote.hook.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/hooks/useNote.hook.ts b/src/hooks/useNote.hook.ts index b6f466e..0ce6cd1 100644 --- a/src/hooks/useNote.hook.ts +++ b/src/hooks/useNote.hook.ts @@ -13,17 +13,19 @@ export const useNote = (containerClass: string) => { const { isMobile } = useOverlay(false) const { stackedNotes, addStackedNote } = useRouteQueryStackedNotes() - const titles = computed(() => - stackedNotes.value?.reduce((obj: Record, note) => { - if (!note) { + const titles = computed( + () => + stackedNotes.value?.reduce((obj: Record, note) => { + if (!note) { + return obj + } + const filePath = + store.files.find((file) => file.sha === note)?.path ?? '' + + obj[note] = pathToNotePathTitle(filePath) + return obj - } - const filePath = store.files.find((file) => file.sha === note)?.path ?? '' - - obj[note] = pathToNotePathTitle(filePath) - - return obj - }, {}) + }, {}) ) const unsubscribeLink = noteEventBus.addEventBusListener(