Skip to content

Commit

Permalink
qs adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
leordev committed Jul 25, 2018
1 parent c2dc0bf commit cb01466
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/bp/BpMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ class BpMain extends Component {

componentDidMount() {
const { location } = this.props
console.log(location.search, qs.parse(location.search))
const query = location.search ? qs.parse(location.search) : {}
return query.search ? this.doSearch(query.search) : this.refreshData()
const search = query["?search"] || query.search
return search ? this.doSearch(search) : this.refreshData()
}

doSearch(search) {
Expand Down

0 comments on commit cb01466

Please sign in to comment.