diff --git a/app/views/RoomMembersView/index.js b/app/views/RoomMembersView/index.js index 59d298d94..5819cf512 100644 --- a/app/views/RoomMembersView/index.js +++ b/app/views/RoomMembersView/index.js @@ -150,6 +150,7 @@ class RoomMembersView extends React.Component { onSearchChangeText = protectedFunction((text) => { const { members } = this.state; let membersFiltered = []; + text = text.trim(); if (members && members.length > 0 && text) { membersFiltered = members.filter(m => m.username.toLowerCase().match(text.toLowerCase()) || m.name.toLowerCase().match(text.toLowerCase()));