From a6bb77de8ab25278ec8d94ee42e1da2f7fe72140 Mon Sep 17 00:00:00 2001 From: kyleplo <31634240+kyleplo@users.noreply.github.com> Date: Tue, 31 Jul 2018 17:26:03 -0400 Subject: [PATCH] Rename m query parameter to mode --- src/views/search/search.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/search/search.jsx b/src/views/search/search.jsx index a19509e44..abd9500f7 100644 --- a/src/views/search/search.jsx +++ b/src/views/search/search.jsx @@ -53,9 +53,9 @@ class Search extends React.Component { this.props.dispatch(navigationActions.setSearchTerm(term)); let mode = ''; - const m = query.lastIndexOf('m='); + const m = query.lastIndexOf('mode='); if (m !== -1) { - mode = query.substring(m + 2, query.length).toLowerCase(); + mode = query.substring(m + 5, query.length).toLowerCase(); } while (mode.indexOf('/') > -1) { mode = mode.substring(0, term.indexOf('/')); @@ -89,7 +89,7 @@ class Search extends React.Component { if (this.state.acceptableModes.indexOf(value) !== -1) { const term = this.props.searchTerm.split(' ').join('+'); window.location = - `${window.location.origin}/search/${this.state.tab}?q=${term}&m=${value}`; + `${window.location.origin}/search/${this.state.tab}?q=${term}&mode=${value}`; } } handleGetSearchMore () {