FIX: reply as linked topic has [object object] in composer
This commit is contained in:
parent
c3f08145b8
commit
5eff3153e5
|
@ -420,7 +420,11 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
|
||||||
draftKey: Composer.REPLY_AS_NEW_TOPIC_KEY,
|
draftKey: Composer.REPLY_AS_NEW_TOPIC_KEY,
|
||||||
categoryId: this.get('category.id')
|
categoryId: this.get('category.id')
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
composerController.get('model').appendText(Em.isEmpty(quotedText) ? Discourse.Post.loadQuote(post.get('id')) : quotedText);
|
if (Em.isEmpty(quotedText)) {
|
||||||
|
return Discourse.Post.loadQuote(post.get('id'));
|
||||||
|
} else {
|
||||||
|
composerController.get('model').appendText(quotedText);
|
||||||
|
}
|
||||||
}).then(q => {
|
}).then(q => {
|
||||||
const postUrl = `${location.protocol}//${location.host}${post.get('url')}`;
|
const postUrl = `${location.protocol}//${location.host}${post.get('url')}`;
|
||||||
const postLink = `[${Handlebars.escapeExpression(self.get('model.title'))}](${postUrl})`;
|
const postLink = `[${Handlebars.escapeExpression(self.get('model.title'))}](${postUrl})`;
|
||||||
|
|
Loading…
Reference in New Issue