From e9812655f6cb7e9e6c06bc1b2a462efc106f52f7 Mon Sep 17 00:00:00 2001
From: Girish S <girish.sonawane@gmail.com>
Date: Mon, 26 Oct 2015 13:00:26 +0530
Subject: made eslint happy

---
 web/react/components/search_bar.jsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'web/react/components/search_bar.jsx')

diff --git a/web/react/components/search_bar.jsx b/web/react/components/search_bar.jsx
index fae26f803..0da43e8cd 100644
--- a/web/react/components/search_bar.jsx
+++ b/web/react/components/search_bar.jsx
@@ -106,11 +106,14 @@ export default class SearchBar extends React.Component {
         if (terms.length) {
             this.setState({isSearching: true});
 
-            if(terms.search(/\*\s*$/) == -1) // append * if not present
-                terms = terms + "*";
+            // append * if not present
+            let searchTerms = terms;
+            if (searchTerms.search(/\*\s*$/) === -1) {
+                searchTerms = searchTerms + '*';
+            }
 
             client.search(
-                terms,
+                searchTerms,
                 (data) => {
                     this.setState({isSearching: false});
                     if (utils.isMobile()) {
-- 
cgit v1.2.3-1-g7c22

