mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-20 20:11:19 -04:00
compact is better
This commit is contained in:
parent
d5b07464ea
commit
165751e71b
2 changed files with 2 additions and 2 deletions
app/assets/javascripts/discourse
|
@ -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 a new issue