Commit 3cd9430f authored by Sindre Sorhus's avatar Sindre Sorhus

Merge pull request #413 from eastridge/gh-pages

Update to thorax latest, fix checkbox error on empty. Fixes #411
parents 88eb07a3 32124a19
......@@ -24,7 +24,10 @@ $(function( $ ) {
},
toggleToggleAllButton: function() {
this.$('#toggle-all')[0].checked = !this.collection.remaining().length;
var toggleInput = this.$('#toggle-all')[0];
if (toggleInput) {
toggleInput.checked = !this.collection.remaining().length;
}
},
// When this function is specified, items will only be shown
......
......@@ -243,7 +243,8 @@ Thorax.templates['src/templates/stats'] = Handlebars.compile('<span id=\"todo-co
},
toggleToggleAllButton: function() {
this.$('#toggle-all')[0].checked = !this.collection.remaining().length;
var toggleInput = this.$('#toggle-all')[0];
toggleInput && (toggleInput.checked = !this.collection.remaining().length);
},
// When this function is specified, items will only be shown
......
......@@ -24,7 +24,10 @@ $(function( $ ) {
},
toggleToggleAllButton: function() {
this.$('#toggle-all')[0].checked = !this.collection.remaining().length;
var toggleInput = this.$('#toggle-all')[0];
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