From a6dcd936bcdf26a7833f1423a45696214e1f7e2a Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 18 May 2022 10:49:08 +0100 Subject: [PATCH] Hooked up "revert to draft" button on complete step after scheduling refs https://github.com/TryGhost/Admin/commit/a19d5c7df36b05e0b466c905881506f795537b76 - added handling of the `afterTask` return value provided when closing the publish flow modal via the revert-to-draft button --- .../admin/app/components/editor-labs/publish-management.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ghost/admin/app/components/editor-labs/publish-management.js b/ghost/admin/app/components/editor-labs/publish-management.js index bd3d4551e4..887745e86d 100644 --- a/ghost/admin/app/components/editor-labs/publish-management.js +++ b/ghost/admin/app/components/editor-labs/publish-management.js @@ -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(); + } } }