mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
compact is better
This commit is contained in:
parent
d5b07464ea
commit
165751e71b
@ -40,7 +40,7 @@ Discourse.SearchController = Em.ArrayController.extend(Discourse.Presence, {
|
||||
.map(function(n){
|
||||
return _(results).where({type: n}).first()
|
||||
})
|
||||
.without(undefined)
|
||||
.compact()
|
||||
.each(function(list){
|
||||
_.each(list.results, function(item){
|
||||
item.index = index++;
|
||||
|
@ -91,7 +91,7 @@ Discourse.TopicList.reopenClass({
|
||||
.map(function(id){
|
||||
return newTopics.find(function(t){ return t.id === id; });
|
||||
})
|
||||
.without(undefined)
|
||||
.compact()
|
||||
.value();
|
||||
|
||||
defer.resolve(topics);
|
||||
|
Loading…
Reference in New Issue
Block a user