mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -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;
|
||||
|
||||
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();
|
||||
|
|
Loading…
Reference in a new issue