From 93f2b6a83302ceef5c98be4fb696840608ad3bc3 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Fri, 23 Sep 2016 12:29:54 -0400 Subject: Updating ESLint (#4085) --- webapp/utils/text_formatting.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'webapp/utils/text_formatting.jsx') diff --git a/webapp/utils/text_formatting.jsx b/webapp/utils/text_formatting.jsx index 3b96a1b42..2b0633e5c 100644 --- a/webapp/utils/text_formatting.jsx +++ b/webapp/utils/text_formatting.jsx @@ -154,7 +154,7 @@ const punctuation = XRegExp.cache('[^\\pL\\d]'); function autolinkAtMentions(text, tokens, usernameMap) { // Test if provided text needs to be highlighted, special mention or current user function mentionExists(u) { - return (Constants.SPECIAL_MENTIONS.indexOf(u) !== -1 || !!usernameMap[u]); + return (Constants.SPECIAL_MENTIONS.indexOf(u) !== -1 || Boolean(usernameMap[u])); } function addToken(username, mention) { @@ -206,7 +206,7 @@ function autolinkAtMentions(text, tokens, usernameMap) { function autolinkChannelMentions(text, tokens, channelNamesMap) { function channelMentionExists(c) { - return !!channelNamesMap[c]; + return Boolean(channelNamesMap[c]); } function addToken(channelName, mention, displayName) { const index = tokens.size; @@ -393,7 +393,7 @@ function parseSearchTerms(searchTerm) { termString = termString.substring(captured[0].length); // break the text up into words based on how the server splits them in SqlPostStore.SearchPosts and then discard empty terms - terms.push(...captured[0].split(/[ <>+\(\)~@]/).filter((term) => !!term)); + terms.push(...captured[0].split(/[ <>+\(\)~@]/).filter((term) => Boolean(term))); continue; } -- cgit v1.2.3-1-g7c22