0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Reformatted big if statement

refs https://github.com/TryGhost/Team/issues/949

- It's relly hard to grasp what's going on in ifs with multiple conditions that are written down in a signle, gazzilion-line format. Having a nice column as way more readable
This commit is contained in:
Naz 2021-08-06 11:17:28 +04:00
parent f698b7785a
commit 3a7bc1349d

View file

@ -633,7 +633,10 @@ Post = ghostBookshelf.Model.extend({
}
// email_recipient_filter is read-only and should only be set using a query param when publishing/scheduling
if (options.email_recipient_filter && options.email_recipient_filter !== 'none' && this.hasChanged('status') && (newStatus === 'published' || newStatus === 'scheduled')) {
if (options.email_recipient_filter
&& (options.email_recipient_filter !== 'none')
&& this.hasChanged('status')
&& (newStatus === 'published' || newStatus === 'scheduled')) {
this.set('email_recipient_filter', options.email_recipient_filter);
}