mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 19:55:43 +00: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];
|
return this._identityMap[id];
|
||||||
},
|
},
|
||||||
|
|
||||||
loadPost(postId){
|
loadPost(postId) {
|
||||||
const url = "/posts/" + postId;
|
const url = "/posts/" + postId;
|
||||||
const store = this.store;
|
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…
x
Reference in New Issue
Block a user