Commit 90878227 authored by ben hockey's avatar ben hockey

use toggle rather than ternary with add/remove

parent 236e44d6
......@@ -94,8 +94,8 @@ define(["dojo/_base/declare",
* we a number of completed and incomplete todo items.
*/
onItemStatusUpdate: function () {
domClass[this.model.complete.value > 0 ? "add" : "remove" ](this.todo_stats, "items_selected");
domClass[this.model.todos.get("length") ? "add" : "remove" ](this.todo_stats, "items_present");
domClass.toggle(this.todo_stats, "items_selected", this.model.complete.value > 0);
domClass.toggle(this.todo_stats, "items_present", this.model.todos.get("length"));
},
/**
......
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