fix wordcount
This commit is contained in:
@@ -10,7 +10,7 @@ export const notes = computed<Note[]>(() => {
|
||||
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[]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user