Commit ae057e10 authored by Sindre Sorhus's avatar Sindre Sorhus

Merge pull request #1018 from michaelficarra/patch-2

replace weird boolean logic with ternary in Backbone example
parents 7837fd1f b6b7915a
......@@ -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