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:
Sam Saffron 2020-05-11 19:05:32 +10:00
parent f293b28198
commit 77f5bb1419
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5
1 changed files with 4 additions and 6 deletions

View File

@ -785,18 +785,16 @@ const Composer = RestModel.extend({
});
}
if (this.get("canEditTitle")) {
this.set("originalTitle", "");
this.set("title", "");
}
if (opts.title) {
this.set("title", opts.title);
}
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);
}