| ... |
... |
@@ -65,18 +65,16 @@ |
| 65 |
65 |
this.nb = e.target.value; |
| 66 |
66 |
} |
| 67 |
67 |
handleSearch(textSearch) { |
| 68 |
|
- console.log(textSearch); |
| 69 |
69 |
if(this.searchText !== "" || textSearch) { |
| 70 |
70 |
// if(this.searchText !== this.prevSearchText) { |
| 71 |
71 |
this.clearResults(); |
| 72 |
72 |
this.prevSearchText = this.searchText; |
| 73 |
73 |
this.fetchWikiSearch().then(results => { |
| 74 |
|
- console.log('results', results); |
| 75 |
75 |
//this.resultsCache = results; |
| 76 |
76 |
if(this.hasActiveFilters()) { |
| 77 |
77 |
this.fetchFilterSearch().then(this.filterResults); |
| 78 |
78 |
} else { |
| 79 |
|
- this.results = results ? results : []; |
|
77 |
+ this.results = results ? results || []; |
| 80 |
80 |
} |
| 81 |
81 |
}) |
| 82 |
82 |
/*} else if (this.searchText === this.prevSearchText && this.hasActiveFilters()) { |