mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 09:35:56 -05:00
Fix getting querystring
This commit is contained in:
parent
78b88443c0
commit
0b9ceb413f
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,8 @@ class Search extends React.Component {
|
||||||
this.state.loadMore = false;
|
this.state.loadMore = false;
|
||||||
|
|
||||||
let mode = '';
|
let mode = '';
|
||||||
|
const query = window.location.search;
|
||||||
|
const q = query.lastIndexOf('q=');
|
||||||
const m = query.lastIndexOf('mode=');
|
const m = query.lastIndexOf('mode=');
|
||||||
if (m !== -1) {
|
if (m !== -1) {
|
||||||
mode = query.substring(m + 5, query.length).toLowerCase();
|
mode = query.substring(m + 5, query.length).toLowerCase();
|
||||||
|
|
Loading…
Reference in a new issue