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:
Javi Martín
2019-06-30 05:15:48 +02:00
parent 1634cd5263
commit dcc838b3d8

View File

@@ -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")