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:
parent
f698b7785a
commit
3a7bc1349d
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue