mirror of
https://github.com/discourse/discourse.git
synced 2026-08-18 00:44:59 -05:00
FIX: Quote button was broken when the quoted post was unloaded
This commit is contained in:
@@ -101,8 +101,10 @@ export default Ember.Controller.extend({
|
|||||||
// defer load if needed, if in an expanded replies section
|
// defer load if needed, if in an expanded replies section
|
||||||
if (!post) {
|
if (!post) {
|
||||||
const postStream = this.get('controllers.topic.model.postStream');
|
const postStream = this.get('controllers.topic.model.postStream');
|
||||||
postStream.loadPost(postId).then(() => this.quoteText());
|
return postStream.loadPost(postId).then(p => {
|
||||||
return;
|
this.set('post', p);
|
||||||
|
return this.quoteText();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we can't create a post, delegate to reply as new topic
|
// If we can't create a post, delegate to reply as new topic
|
||||||
|
|||||||
@@ -445,8 +445,7 @@ const PostStream = RestModel.extend({
|
|||||||
const url = "/posts/" + postId;
|
const url = "/posts/" + postId;
|
||||||
const store = this.store;
|
const store = this.store;
|
||||||
|
|
||||||
return Discourse.ajax(url).then((p) =>
|
return Discourse.ajax(url).then(p => this.storePost(store.createRecord('post', p)));
|
||||||
this.storePost(store.createRecord('post', p)));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user