Commit 27b885f8 authored by Thomas Coopman's avatar Thomas Coopman

use object identity to compare (immutable data)

parent 0162bf8f
......@@ -61,7 +61,7 @@
window.TodoModel.prototype.destroy = function (todo) {
this.todos = this.todos.filter(function (candidate) {
return candidate.id !== todo.id;
return candidate !== todo;
});
this.inform();
......
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