From 2a43d70869f0cdab29548964a097ee45497d22b5 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 12 Jun 2013 16:00:43 +1000 Subject: [PATCH] refactor --- app/assets/javascripts/discourse/views/topic_view.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/views/topic_view.js b/app/assets/javascripts/discourse/views/topic_view.js index 2fd71b9ee..e2badcd7e 100644 --- a/app/assets/javascripts/discourse/views/topic_view.js +++ b/app/assets/javascripts/discourse/views/topic_view.js @@ -143,9 +143,7 @@ Discourse.TopicView = Discourse.View.extend(Discourse.Scrolling, { if(suggested) { - var existing = _.map(suggested, function(topic){ - return topic.get("id"); - }); + var existing = _.invoke(suggested, 'get', 'id'); var lookup = _.chain(incoming) .last(5)