diff --git a/src/composables/useNotes.ts b/src/composables/useNotes.ts index 4375132..e677cfc 100644 --- a/src/composables/useNotes.ts +++ b/src/composables/useNotes.ts @@ -10,7 +10,7 @@ export const notes = computed(() => { return Object.entries(baseNotes) .map(([_, note]) => ({ ...note, - wordCount: note.content.split(' ').length - 1, + wordCount: note.content.split(' ').filter((word) => word.length > 0).length, })) .sort((a, b) => b.modified - a.modified) as Note[] })