From 3d1f42dc0a50b2dfc3230028fa715f61916eeb4b 2014-11-20 00:44:35 From: Jason Grout Date: 2014-11-20 00:44:35 Subject: [PATCH] Make a copy of the input list so that changes to the children list don't automagically change our reference list --- diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index 1f3c919..5c87bdc 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -643,7 +643,8 @@ define(["widgets/js/manager", for (; i < new_models.length; i++) { added_views.push(create.call(context, new_models[i])); } - that._models = new_models; + // make a copy of the input array + that._models = new_models.slice(); return Promise.all(added_views, function(added) { that.views = that.views.slice(0,first_removed).concat(added); });