From f539cfdad8b7790cc66f2c752b3f1f7c8c0453bb 2014-07-25 19:09:58 From: Brian E. Granger Date: 2014-07-25 19:09:58 Subject: [PATCH] Merge pull request #6182 from SylvainCorlay/do-diff-correction do_diff function was always removing all views from the old list. --- diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index c04e497..99a1877 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -348,7 +348,7 @@ define(["widgets/js/manager", // Walk the lists until an unequal entry is found. var i; for (i = 0; i < new_list.length; i++) { - if (i < old_list.length || new_list[i] !== old_list[i]) { + if (i >= old_list.length || new_list[i] !== old_list[i]) { break; } } @@ -359,7 +359,7 @@ define(["widgets/js/manager", } // Add the rest of the new list items. - for (i; i < new_list.length; i++) { + for (; i < new_list.length; i++) { added_callback(new_list[i]); } },