Skip to content

Commit

Permalink
Merge pull request #1100 from jasongrout/restoration
Browse files Browse the repository at this point in the history
Fix restoration of widgets on refresh.
  • Loading branch information
SylvainCorlay committed Feb 10, 2017
2 parents efcff65 + d2e0793 commit b87993b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions widgetsnbextension/src/manager.js
Expand Up @@ -72,8 +72,9 @@ var WidgetManager = function (comm_manager, notebook) {
if (cell.output_area) {
outputs = cell.output_area.outputs;
for (var j = 0; j < outputs.length; ++j) {
if (outputs[j].data['application/vnd.jupyter.widget-view+json']) {
var model_promise = that.get_model(outputs[j].data['application/vnd.jupyter.widget-view+json'].model_id);
var out = outputs[j];
if (out.output_type==="display_data" && out.data['application/vnd.jupyter.widget-view+json']) {
var model_promise = that.get_model(out.data['application/vnd.jupyter.widget-view+json'].model_id);
if (model_promise !== undefined) {
model_promise.then((function(cell_index) {
return function (model) {
Expand Down

0 comments on commit b87993b

Please sign in to comment.