mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 12:13:58 -06:00
FIX: Quoting an expanded first post would force it to reload the cooked
This commit is contained in:
parent
0722ffadf1
commit
3736b440cb
@ -448,11 +448,18 @@ export default RestModel.extend({
|
||||
return this._identityMap[id];
|
||||
},
|
||||
|
||||
loadPost(postId){
|
||||
loadPost(postId) {
|
||||
const url = "/posts/" + postId;
|
||||
const store = this.store;
|
||||
const existing = this._identityMap[postId];
|
||||
|
||||
return ajax(url).then(p => this.storePost(store.createRecord('post', p)));
|
||||
return ajax(url).then(p => {
|
||||
if (existing) {
|
||||
p.cooked = existing.cooked;
|
||||
}
|
||||
|
||||
return this.storePost(store.createRecord('post', p));
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user