mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: Quote button was broken when the quoted post was unloaded
This commit is contained in:
parent
f3d9d1295a
commit
09195768be
2 changed files with 5 additions and 4 deletions
|
@ -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)));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue