mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 14:22:52 +08:00
FIX: stop clearing title by mistake
b180e6e737
caused a short lived regression.
This code is very deliberate about ensuring originalTitle is
set correctly
This commit is contained in:
parent
f293b28198
commit
77f5bb1419
|
@ -785,18 +785,16 @@ const Composer = RestModel.extend({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.get("canEditTitle")) {
|
|
||||||
this.set("originalTitle", "");
|
|
||||||
this.set("title", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (opts.title) {
|
if (opts.title) {
|
||||||
this.set("title", opts.title);
|
this.set("title", opts.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.set("originalText", opts.draft ? "" : this.reply);
|
this.set("originalText", opts.draft ? "" : this.reply);
|
||||||
|
|
||||||
if (this.editingFirstPost) {
|
if (this.canEditTitle) {
|
||||||
|
if (isEmpty(this.title) && this.title !== "") {
|
||||||
|
this.set("title", "");
|
||||||
|
}
|
||||||
this.set("originalTitle", this.title);
|
this.set("originalTitle", this.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user