summaryrefslogtreecommitdiffstats
path: root/webapp/components/channel_invite_modal.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/channel_invite_modal.jsx')
-rw-r--r--webapp/components/channel_invite_modal.jsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/webapp/components/channel_invite_modal.jsx b/webapp/components/channel_invite_modal.jsx
index 5deec0794..2f1a10a75 100644
--- a/webapp/components/channel_invite_modal.jsx
+++ b/webapp/components/channel_invite_modal.jsx
@@ -107,16 +107,17 @@ export default class ChannelInviteModal extends React.Component {
}
search(term) {
+ clearTimeout(this.searchTimeoutId);
+
this.term = term;
if (term === '') {
this.onChange(true);
this.setState({search: false});
+ this.searchTimeoutId = '';
return;
}
- clearTimeout(this.searchTimeoutId);
-
const searchTimeoutId = setTimeout(
() => {
searchUsers(