diff --git a/IPython/html/static/notebook/js/celltoolbar.js b/IPython/html/static/notebook/js/celltoolbar.js index e320212..fc69d38 100644 --- a/IPython/html/static/notebook/js/celltoolbar.js +++ b/IPython/html/static/notebook/js/celltoolbar.js @@ -234,7 +234,7 @@ var IPython = (function (IPython) { * */ CellToolbar.rebuild_all = function(){ - for(var i in CellToolbar._instances){ + for(var i=0; i < CellToolbar._instances.length; i++){ CellToolbar._instances[i].rebuild(); } }; @@ -252,8 +252,8 @@ var IPython = (function (IPython) { var callbacks = CellToolbar._callback_dict; var preset = CellToolbar._ui_controls_list; // Yes we iterate on the class variable, not the instance one. - for (var index in preset) { - var key = preset[index]; + for (var i=0; i < preset.length; i++) { + var key = preset[i]; var callback = callbacks[key]; if (!callback) continue; @@ -380,10 +380,10 @@ var IPython = (function (IPython) { var button_container = $(div); var lbl = $("