From 8652f16005d5e7a0a3bc3fa65c374e31d41d99c7 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 11 May 2022 09:25:23 +0100 Subject: [PATCH] Fixed publish confirmation button text no issue - the button text would still say "Publish & send" when no members were selected - changed from comparing `publishOptions.publishType` directly to using the `willPublish` and `willEmail` convenience getters so the button text better matches the action being taken --- .../editor-labs/modals/publish-flow/confirm.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ghost/admin/app/components/editor-labs/modals/publish-flow/confirm.js b/ghost/admin/app/components/editor-labs/modals/publish-flow/confirm.js index 18191e3c9c..f31fd234c5 100644 --- a/ghost/admin/app/components/editor-labs/modals/publish-flow/confirm.js +++ b/ghost/admin/app/components/editor-labs/modals/publish-flow/confirm.js @@ -11,16 +11,16 @@ export default class PublishFlowOptions extends Component { willPublish = this.args.publishOptions.willPublish; get confirmButtonText() { - const publishType = this.args.publishOptions.publishType; + const publishOptions = this.args.publishOptions; let buttonText = ''; - if (publishType === 'publish+send') { + if (publishOptions.willPublish && publishOptions.willEmail) { buttonText = 'Publish & send'; - } else if (publishType === 'publish') { - buttonText = `Publish ${this.args.publishOptions.post.displayName}`; - } else if (publishType === 'send') { + } else if (publishOptions.willOnlyEmail) { buttonText = 'Send email'; + } else { + buttonText = `Publish ${this.args.publishOptions.post.displayName}`; } if (this.args.publishOptions.isScheduled) {