Commit b6b7915a authored by Michael Ficarra's avatar Michael Ficarra

replace weird boolean logic with ternary

parent 7837fd1f
......@@ -60,10 +60,9 @@ var app = app || {};
},
isHidden: function () {
var isCompleted = this.model.get('completed');
return (// hidden cases only
(!isCompleted && app.TodoFilter === 'completed') ||
(isCompleted && app.TodoFilter === 'active')
return this.model.get('completed') ?
app.TodoFilter === 'active' :
app.TodoFilter === 'completed';
);
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment