logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 08421939571205e611c1743dfbad1b76083e7f06
parent 2e20c2c46a8519add35d6e994ab3af6429fec10e
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date:   Fri,  3 Mar 2023 10:10:06 +0000

Merge branch 'tusooa/1249-suggestor' into 'develop'

Make suggestor ignore users without valid names

Closes #1249

See merge request pleroma/pleroma-fe!1794

Diffstat:

Msrc/components/emoji_input/suggestor.js5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/components/emoji_input/suggestor.js b/src/components/emoji_input/suggestor.js @@ -94,8 +94,9 @@ export const suggestUsers = ({ dispatch, state }) => { const newSuggestions = state.users.users.filter( user => - user.screen_name.toLowerCase().startsWith(noPrefix) || - user.name.toLowerCase().startsWith(noPrefix) + user.screen_name && user.name && ( + user.screen_name.toLowerCase().startsWith(noPrefix) || + user.name.toLowerCase().startsWith(noPrefix)) ).slice(0, 20).sort((a, b) => { let aScore = 0 let bScore = 0