mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 20:22:45 +08:00
FIX: Quote button was broken when the quoted post was unloaded
This commit is contained in:
parent
f3d9d1295a
commit
09195768be
|
@ -101,8 +101,10 @@ export default Ember.Controller.extend({
|
|||
// defer load if needed, if in an expanded replies section
|
||||
if (!post) {
|
||||
const postStream = this.get('controllers.topic.model.postStream');
|
||||
postStream.loadPost(postId).then(() => this.quoteText());
|
||||
return;
|
||||
return postStream.loadPost(postId).then(p => {
|
||||
this.set('post', p);
|
||||
return this.quoteText();
|
||||
});
|
||||
}
|
||||
|
||||
// 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 store = this.store;
|
||||
|
||||
return Discourse.ajax(url).then((p) =>
|
||||
this.storePost(store.createRecord('post', p)));
|
||||
return Discourse.ajax(url).then(p => this.storePost(store.createRecord('post', p)));
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user