@@ -101,7 +110,7 @@
>
{#if doc.type === 'collection'}
- #{doc.name}
+ {doc?.title ?? `#${doc.name}`}
Collection
diff --git a/src/lib/components/chat/Messages/UserMessage.svelte b/src/lib/components/chat/Messages/UserMessage.svelte
index 0e0fc332f..c2867d549 100644
--- a/src/lib/components/chat/Messages/UserMessage.svelte
+++ b/src/lib/components/chat/Messages/UserMessage.svelte
@@ -140,7 +140,7 @@
- #{file.name}
+ {file?.title ?? `#${file.name}`}
Collection
diff --git a/src/lib/components/documents/EditDocModal.svelte b/src/lib/components/documents/EditDocModal.svelte
index 43b90e021..4974da5a1 100644
--- a/src/lib/components/documents/EditDocModal.svelte
+++ b/src/lib/components/documents/EditDocModal.svelte
@@ -37,7 +37,7 @@
};
const addTagHandler = async (tagName) => {
- if (!tags.find((tag) => tag.name === tagName)) {
+ if (!tags.find((tag) => tag.name === tagName) && tagName !== '') {
tags = [...tags, { name: tagName }];
await tagDocByName(localStorage.token, doc.name, {