0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Hooked up "revert to draft" button on complete step after scheduling

refs a19d5c7df3

- added handling of the `afterTask` return value provided when closing the publish flow modal via the revert-to-draft button
This commit is contained in:
Kevin Ansfield 2022-05-18 10:49:08 +01:00
parent ea98469e6e
commit a6dcd936bc

View file

@ -53,6 +53,13 @@ export default class PublishManagement extends Component {
saveTask: this.publishTask,
togglePreviewPublish: this.togglePreviewPublish
});
const result = await this.publishFlowModal;
if (result?.afterTask && this[result?.afterTask]) {
await timeout(160); // wait for modal animation to finish
this[result.afterTask].perform();
}
}
}