Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: remove spaces in file.attributes.tags

shuai0668b4f255fc
diff --git a/ui/src/pages/Questions/Ask/index.tsx b/ui/src/pages/Questions/Ask/index.tsx
index fe6afd69..149373ed 100644
--- a/ui/src/pages/Questions/Ask/index.tsx
+++ b/ui/src/pages/Questions/Ask/index.tsx
@@ -148,7 +148,12 @@ const Ask = () => {
formData.title.value = file.attributes?.title;
formData.content.value = file.body;
if (!queryTags && file.attributes?.tags) {
- updateTags(file.attributes.tags);
+ // Remove spaces in file.attributes.tags
+ const filterTags = file.attributes.tags
+ .split(',')
+ .map((tag) => tag.trim())
+ .join(',');
+ updateTags(filterTags);
}
} else if (draft) {
formData.title.value = draft.title;