Commit df820b52 authored by oak-tree's avatar oak-tree Committed by Sindre Sorhus

Close GH-974: no using underscore -> no last() on collection..

parent e3d28cb2
......@@ -25,6 +25,11 @@ var app = app || {};
remaining: function () {
return this.where({completed: false});
},
// Return last item on list if any. Otherwise return null.
last: function () {
return this.length > 0 ? this.at(this.length - 1) : null;
},
// We keep the Todos in sequential order, despite being saved by unordered
// GUID in the database. This generates the next order number for new items.
......
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