Commit 32124a19 authored by Ryan Eastridge's avatar Ryan Eastridge

Use if instead of &&

parent 7ae098d5
......@@ -25,7 +25,9 @@ $(function( $ ) {
toggleToggleAllButton: function() {
var toggleInput = this.$('#toggle-all')[0];
toggleInput && (toggleInput.checked = !this.collection.remaining().length);
if (toggleInput) {
toggleInput.checked = !this.collection.remaining().length;
}
},
// When this function is specified, items will only be shown
......
......@@ -25,7 +25,9 @@ $(function( $ ) {
toggleToggleAllButton: function() {
var toggleInput = this.$('#toggle-all')[0];
toggleInput && (toggleInput.checked = !this.collection.remaining().length);
if (toggleInput) {
toggleInput.checked = !this.collection.remaining().length;
}
},
// When this function is specified, items will only be shown
......
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