Skip to content

Commit

Permalink
Search for non string queries (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Delerme committed Sep 16, 2019
1 parent 8606d34 commit 4defdf4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ui/components/search/searchcomponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ export default class SearchComponent extends Component {
* Optionally provided
* @type {string}
*/
this.query = config.query || this.core.globalStorage.getState(StorageKeys.QUERY) || '';
this.query = config.query || String(this.core.globalStorage.getState(StorageKeys.QUERY)) || '';
this.core.globalStorage.on('update', StorageKeys.QUERY, q => {
this.query = q;
this.query = String(q);
this.setState();
this.search(q);
});
Expand Down Expand Up @@ -131,7 +131,7 @@ export default class SearchComponent extends Component {
}

onCreate () {
if (this.query && this.query.length > 0) {
if (this.query) {
this.core.setQuery(this.query);
this.search(this.query);
}
Expand Down

0 comments on commit 4defdf4

Please sign in to comment.