From 3736b440cbced8d5d00ab62553b21fd63c13113c Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 1 May 2017 15:00:59 -0400 Subject: [PATCH] FIX: Quoting an expanded first post would force it to reload the cooked --- .../javascripts/discourse/models/post-stream.js.es6 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/models/post-stream.js.es6 b/app/assets/javascripts/discourse/models/post-stream.js.es6 index 419baf7ccb1..de1ab50f782 100644 --- a/app/assets/javascripts/discourse/models/post-stream.js.es6 +++ b/app/assets/javascripts/discourse/models/post-stream.js.es6 @@ -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)); + }); }, /**