mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: If a category can't be found, don't include it in the list
This commit is contained in:
parent
5492bbe11c
commit
5ec77d4be4
1 changed files with 2 additions and 3 deletions
|
@ -39,9 +39,8 @@ export default function searchForTerm(term, opts) {
|
|||
});
|
||||
|
||||
results.categories = results.categories.map(function(category){
|
||||
category = Discourse.Category.list().findProperty('id', category.id);
|
||||
return category;
|
||||
});
|
||||
return Discourse.Category.list().findProperty('id', category.id);
|
||||
}).compact();
|
||||
|
||||
var r = results.grouped_search_result;
|
||||
results.resultTypes = [];
|
||||
|
|
Loading…
Reference in a new issue