diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index 394b50dfc..d7bac7623 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -579,8 +579,8 @@ define(["widgets/js/manager", } // 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); + return Promise.all(added_views).then(function(added) { + Array.prototype.splice.apply(that.views, [first_removed, that.views.length].concat(added)); return that.views; }); });