FIX: Search was not being initialized properly.
`results` is now an array `[]` not an object, and `suggestionResults` was not being initialized properly.
This commit is contained in:
parent
4b6307ecd9
commit
30e1dbe353
|
@ -18,13 +18,14 @@ const searchData = {};
|
||||||
|
|
||||||
export function initSearchData() {
|
export function initSearchData() {
|
||||||
searchData.loading = false;
|
searchData.loading = false;
|
||||||
searchData.results = {};
|
searchData.results = [];
|
||||||
searchData.noResults = false;
|
searchData.noResults = false;
|
||||||
searchData.term = undefined;
|
searchData.term = undefined;
|
||||||
searchData.typeFilter = null;
|
searchData.typeFilter = null;
|
||||||
searchData.invalidTerm = false;
|
searchData.invalidTerm = false;
|
||||||
searchData.topicId = null;
|
searchData.topicId = null;
|
||||||
searchData.afterAutocomplete = false;
|
searchData.afterAutocomplete = false;
|
||||||
|
searchData.suggestionResults = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
initSearchData();
|
initSearchData();
|
||||||
|
|
Loading…
Reference in New Issue