FIX: If a category can't be found, don't include it in the list
This commit is contained in:
parent
5492bbe11c
commit
5ec77d4be4
|
@ -39,9 +39,8 @@ export default function searchForTerm(term, opts) {
|
||||||
});
|
});
|
||||||
|
|
||||||
results.categories = results.categories.map(function(category){
|
results.categories = results.categories.map(function(category){
|
||||||
category = Discourse.Category.list().findProperty('id', category.id);
|
return Discourse.Category.list().findProperty('id', category.id);
|
||||||
return category;
|
}).compact();
|
||||||
});
|
|
||||||
|
|
||||||
var r = results.grouped_search_result;
|
var r = results.grouped_search_result;
|
||||||
results.resultTypes = [];
|
results.resultTypes = [];
|
||||||
|
|
Loading…
Reference in New Issue