##// END OF EJS Templates
Fix variable scope.
Jonathan Frederic -
Show More
@@ -381,16 +381,18 b' define(['
381 };
381 };
382
382
383 // Get the views that are displayed *now*.
383 // Get the views that are displayed *now*.
384 model_promises.push(utils.resolve_promises_dict(model.views).then(function(model_views) {
384 (function(local_state) {
385 for (var id in model_views) {
385 model_promises.push(utils.resolve_promises_dict(model.views).then(function(model_views) {
386 if (model_views.hasOwnProperty(id)) {
386 for (var id in model_views) {
387 var view = model_views[id];
387 if (model_views.hasOwnProperty(id)) {
388 if (view.options.cell_index) {
388 var view = model_views[id];
389 state[model_id].views.push(view.options.cell_index);
389 if (view.options.cell_index) {
390 local_state.views.push(view.options.cell_index);
391 }
390 }
392 }
391 }
393 }
392 }
394 }));
393 }));
395 })(state[model_id]);
394 }
396 }
395 }
397 }
396 }
398 }
General Comments 0
You need to be logged in to leave comments. Login now