From 5fe5b5029b55065cb2741c631c9ee48927381cc3 Mon Sep 17 00:00:00 2001 From: Stefan Keim Date: Wed, 27 Apr 2016 08:50:54 +0200 Subject: [PATCH] correct index ```todos.splice(index, 1)``` in destroy makes the elements shift; therefor loops index has to be aligned has to be corrected --- examples/todomvc/todomvc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/todomvc/todomvc.js b/examples/todomvc/todomvc.js index 78a646ec..58136282 100644 --- a/examples/todomvc/todomvc.js +++ b/examples/todomvc/todomvc.js @@ -39,7 +39,7 @@ function countRemaining() { } function clear() { for (var i = 0; i < todos.length; i++) { - if (todos[i].completed) destroy(todos[i]) + if (todos[i].completed) destroy(todos[i--]) } }