compact is better

This commit is contained in:
Sam 2013-06-12 15:47:58 +10:00
parent d5b07464ea
commit 165751e71b
2 changed files with 2 additions and 2 deletions

View File

@ -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++;

View File

@ -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);