Profile editing: Fix regression with adding tags (#38580)

This commit is contained in:
Echo authored and GitHub committed 2026-04-07 12:05:06 +00:00
1 parent ed6ceda71d
commit 85fb9218a7
3 files changed
+14 -7

No files matched your search

@@ -91,8 +91,8 @@ export function useSearchTags({
// Add dedicated item for adding the current query
const tags = useMemo(() => {
const trimmedQuery = query ? trimHashFromStart(query.trim()) : '';
if (!trimmedQuery || !fetchedTags.length) {
return fetchedTags;
if (!trimmedQuery) {
return fetchedTags as TagSearchResult[];
}
const results: TagSearchResult[] = [...fetchedTags]; // Make array mutable