[Glitch] Preserve hashtag casing in web UI hashtag history

Port f9b23a5d62 to glitch-soc
This commit is contained in:
Thibaut Girka
2018-08-28 13:54:56 +02:00
committed by ThibG
parent 24b6811a6e
commit 3b09597556
2 changed files with 6 additions and 5 deletions

View File

@@ -214,7 +214,7 @@ const updateSuggestionTags = (state, token) => {
return state.merge({
suggestions: state.get('tagHistory')
.filter(tag => tag.startsWith(prefix))
.filter(tag => tag.toLowerCase().startsWith(prefix.toLowerCase()))
.slice(0, 4)
.map(tag => '#' + tag),
suggestion_token: token,