mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 03:23:39 +08:00
FIX: Always reload post's raw when editing a post (#14085)
Sometimes the message bus update can be delayed and editing a post when that happens will automatically result in a draft conflict.
This commit is contained in:
parent
5eb4e642a6
commit
a56122f2d3
|
@ -831,22 +831,13 @@ const Composer = RestModel.extend({
|
||||||
this.setProperties(topicProps);
|
this.setProperties(topicProps);
|
||||||
|
|
||||||
promise = promise.then(() => {
|
promise = promise.then(() => {
|
||||||
let rawPromise = Promise.resolve();
|
let rawPromise = this.store.find("post", opts.post.id).then((post) => {
|
||||||
|
|
||||||
if (!this.post.raw) {
|
|
||||||
rawPromise = this.store.find("post", opts.post.id).then((post) => {
|
|
||||||
this.setProperties({
|
|
||||||
post,
|
|
||||||
reply: post.raw,
|
|
||||||
originalText: post.raw,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.setProperties({
|
this.setProperties({
|
||||||
reply: this.post.raw,
|
post,
|
||||||
originalText: this.post.raw,
|
reply: post.raw,
|
||||||
|
originalText: post.raw,
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
|
|
||||||
// edge case ... make a post then edit right away
|
// edge case ... make a post then edit right away
|
||||||
// store does not have topic for the post
|
// store does not have topic for the post
|
||||||
|
|
Loading…
Reference in New Issue
Block a user