We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80813ce commit 8fd47d0Copy full SHA for 8fd47d0
frontend/components/Bookmark/NewBookmarkCard.tsx
@@ -104,14 +104,20 @@ export default function NewBookmarkCard() {
104
105
const handleOnSubmit = async (
106
submittedBmk: NewBookmarkForm,
107
- actions: any,
+ actions: any
108
) => {
109
// Get the last inputted string and all the tags already entered.
110
let tags: Tag[] = strTags.map((t) => ({ title: t, id: -1 }));
111
if (tagInput) {
112
// FIXME
113
tags.push({ title: tagInput, id: -1 });
114
}
115
+
116
+ // Add default "untagged" tag if user has not provided any
117
+ if (!tags.length) {
118
+ tags = [{ title: "untagged", id: -1 }];
119
+ }
120
121
let newBkmk: Bookmark = {
122
id: -1,
123
title: submittedBmk.title || submittedBmk.url,
0 commit comments