diff --git a/labs/architecture-examples/thorax/js/views/stats.js b/labs/architecture-examples/thorax/js/views/stats.js index 89d7f00f1b..8e0ceefb5f 100644 --- a/labs/architecture-examples/thorax/js/views/stats.js +++ b/labs/architecture-examples/thorax/js/views/stats.js @@ -31,9 +31,11 @@ Thorax.View.extend({ // be called to generate the context / scope that the template // will be called with. "context" defaults to "return this" context: function() { + var remaining = app.Todos.remaining().length; return { + itemText: remaining === 1 ? 'item' : 'items', completed: app.Todos.completed().length, - remaining: app.Todos.remaining().length + remaining: remaining }; },