From 0b9ceb413fa494ea60e01cbfe8debe0945815e8a Mon Sep 17 00:00:00 2001 From: kyleplo <31634240+kyleplo@users.noreply.github.com> Date: Wed, 22 Aug 2018 14:25:31 -0400 Subject: [PATCH] Fix getting querystring --- src/views/search/search.jsx | 2 ++ 1 file changed, 2 insertions(+) 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();