mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Fixed undefined member count for scheduled posts in publish update flow
no issue - in the update flow we were always using `post.email.emailCount` but scheduled posts won't yet have a `post.email` record - switched to showing a count of members based on the post's newsletter slug and `emailRecipientFilter`
This commit is contained in:
parent
2768dc74ad
commit
e74b042d18
1 changed files with 7 additions and 1 deletions
|
@ -32,7 +32,13 @@
|
|||
published and sent to
|
||||
{{/if}}
|
||||
|
||||
<strong>{{pluralize post.email.emailCount "member"}}</strong>.
|
||||
{{#if post.isScheduled}}
|
||||
{{#let (members-count-fetcher query=(hash filter=(concat "newsletters:" post.newsletter.slug "+" post.emailRecipientFilter))) as |countFetcher|}}
|
||||
<strong>{{gh-pluralize countFetcher.count "member"}}</strong>.
|
||||
{{/let}}
|
||||
{{else}}
|
||||
<strong>{{pluralize post.email.emailCount "member"}}</strong>.
|
||||
{{/if}}
|
||||
{{else}}
|
||||
published.
|
||||
{{/if}}
|
||||
|
|
Loading…
Add table
Reference in a new issue