mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
Fixed create newsletter confirmation showing when editing existing newsletter
closes https://github.com/TryGhost/Team/issues/1537 - added conditional around the create confirmation modal display so it's only shown when attempting to save a new newsletter record
This commit is contained in:
parent
58290a6134
commit
e7ddf8aaef
@ -55,15 +55,17 @@ export default class EditNewsletterModal extends Component {
|
||||
|
||||
const {optInExisting} = this;
|
||||
|
||||
const shouldCreate = yield this.modals.open(ConfirmCreateModal, {
|
||||
optInExisting,
|
||||
newsletter: this.args.data.newsletter,
|
||||
activeNewsletterSlugs: this.activeNewsletterSlugs
|
||||
});
|
||||
if (this.args.data.newsletter.isNew) {
|
||||
const shouldCreate = yield this.modals.open(ConfirmCreateModal, {
|
||||
optInExisting,
|
||||
newsletter: this.args.data.newsletter,
|
||||
activeNewsletterSlugs: this.activeNewsletterSlugs
|
||||
});
|
||||
|
||||
if (!shouldCreate) {
|
||||
// ensure task button returns to idle state
|
||||
return 'canceled';
|
||||
if (!shouldCreate) {
|
||||
// ensure task button returns to idle state
|
||||
return 'canceled';
|
||||
}
|
||||
}
|
||||
|
||||
const newEmail = this.args.data.newsletter.senderEmail;
|
||||
|
Loading…
Reference in New Issue
Block a user