FIX: Topic map expansion broken without links.

This commit is contained in:
Robin Ward 2013-11-18 17:06:52 -05:00
parent a8f9ba7566
commit 89a96b9e94

View file

@ -33,11 +33,12 @@ Discourse.DiscourseTopicMapComponent = Ember.Component.extend({
}.property('allLinksShown', 'topic.details.links'),
infoLinks: function() {
if (Em.isNone('details.links')) return [];
var allLinks = this.get('details.links');
if (Em.isNone(allLinks)) return [];
if (this.get('allLinksShown')) return allLinks;
return allLinks.slice(0, LINKS_SHOWN);
}.property('details.links', 'allLinksShown'),
actions: {