fix broken text when clicking share at the bottom

This commit is contained in:
Sam 2013-09-12 11:47:41 +10:00
parent 6d5e20fe4a
commit fc203b7c2c
1 changed files with 6 additions and 1 deletions

View File

@ -13,7 +13,12 @@ Discourse.ShareView = Discourse.View.extend({
title: function() {
if (this.get('controller.type') === 'topic') return I18n.t('share.topic');
return I18n.t('share.post', {postNumber: this.get('controller.postNumber')});
var postNumber = this.get('controller.postNumber');
if (postNumber) {
return I18n.t('share.post', {postNumber: this.get('controller.postNumber')});
} else {
return I18n.t('share.topic');
}
}.property('controller.type', 'controller.postNumber'),
hasLink: function() {