partial fix for suggested js error
This commit is contained in:
parent
201891f51f
commit
d5b07464ea
|
@ -87,9 +87,14 @@ Discourse.TopicList.reopenClass({
|
|||
// the new topics loaded from the server
|
||||
var newTopics = Discourse.TopicList.topicsFrom(result);
|
||||
|
||||
defer.resolve(topic_ids.map(function(id){
|
||||
var topics = _(topic_ids)
|
||||
.map(function(id){
|
||||
return newTopics.find(function(t){ return t.id === id; });
|
||||
}));
|
||||
})
|
||||
.without(undefined)
|
||||
.value();
|
||||
|
||||
defer.resolve(topics);
|
||||
} else {
|
||||
defer.reject();
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ Discourse.TopicView = Discourse.View.extend(Discourse.Scrolling, {
|
|||
|
||||
if(suggested) {
|
||||
|
||||
var existing = _(suggested).map(function(topic){
|
||||
var existing = _.map(suggested, function(topic){
|
||||
return topic.get("id");
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue