Skip to content

Commit

Permalink
Provide empty results to templates by default (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Delerme committed Aug 5, 2019
1 parent 08385d7 commit 3e598e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ui/components/results/resultscomponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default class ResultsComponent extends Component {

setState (data, val) {
const searchState = data.searchState || SearchStates.PRE_SEARCH;
return super.setState(Object.assign({}, data, {
return super.setState(Object.assign({ results: [] }, data, {
isPreSearch: searchState === SearchStates.PRE_SEARCH,
isSearchLoading: searchState === SearchStates.SEARCH_LOADING,
isSearchComplete: searchState === SearchStates.SEARCH_COMPLETE,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/results/universalresultscomponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class UniversalResultsComponent extends Component {

setState (data, val) {
const searchState = data.searchState || SearchStates.PRE_SEARCH;
return super.setState(Object.assign({}, data, {
return super.setState(Object.assign({ sections: [] }, data, {
isPreSearch: searchState === SearchStates.PRE_SEARCH,
isSearchLoading: searchState === SearchStates.SEARCH_LOADING,
isSearchComplete: searchState === SearchStates.SEARCH_COMPLETE
Expand Down

0 comments on commit 3e598e0

Please sign in to comment.