add default tag

This commit is contained in:
Jonathan Jenne 2022-06-20 21:41:02 +02:00
parent 0dc14812de
commit 7844996672
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,10 @@ export function createNote(noteTitle) {
const tags = hashtags.map(entry => entry.value.slice(1))
const title = hashtags.reduce(removeHashtag, noteTitle)
if (tags.length === 0) {
tags.push("none")
}
return {
title,
tags,