diff --git a/src/views/search/search.jsx b/src/views/search/search.jsx index d9d87f659..adc221964 100644 --- a/src/views/search/search.jsx +++ b/src/views/search/search.jsx @@ -39,6 +39,8 @@ class Search extends React.Component { this.state.loadMore = false; let mode = ''; + const query = window.location.search; + const q = query.lastIndexOf('q='); const m = query.lastIndexOf('mode='); if (m !== -1) { mode = query.substring(m + 5, query.length).toLowerCase();