mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Fixed email-only publish flow
no issue - we were comparing the wrong `publishType` value - we were accessing `this.willEmail` _after_ setting model properties that would change it's value so we grab the value before making any changes
This commit is contained in:
parent
b0038d71b6
commit
607378580b
1 changed files with 4 additions and 2 deletions
|
@ -314,6 +314,8 @@ export class PublishOptions {
|
|||
// track of the previous values in case saving fails. We can't use ED's
|
||||
// rollbackAttributes() because it would also rollback any other unsaved edits
|
||||
_applyModelChanges() {
|
||||
const willEmail = this.willEmail;
|
||||
|
||||
// store backup of original values in case we need to revert
|
||||
this._originalModelValues = {};
|
||||
|
||||
|
@ -334,8 +336,8 @@ export class PublishOptions {
|
|||
this.post.publishedAtUTC = this.scheduledAtUTC;
|
||||
}
|
||||
|
||||
if (this.willEmail) {
|
||||
this.post.emailOnly = this.publishType === 'email';
|
||||
if (willEmail) {
|
||||
this.post.emailOnly = this.publishType === 'send';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue