Make conditions easier to read
Combining both the inline and "traditional" `if` styles made the code difficult to read, particularly when compiled to JavaScript.
This commit is contained in:
@@ -20,5 +20,5 @@ App.BudgetEditAssociations =
|
||||
click: ->
|
||||
div_id = $(this).data().toggle
|
||||
$(".js-budget-users-list").each ->
|
||||
if this.id != div_id
|
||||
$(this).addClass("is-hidden") if !$(this).hasClass("is-hidden")
|
||||
if this.id != div_id && !$(this).hasClass("is-hidden")
|
||||
$(this).addClass("is-hidden")
|
||||
|
||||
Reference in New Issue
Block a user