@fails-components/jupyter-applet-view 0.0.1-alpha.12 → 0.0.1-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -358,7 +358,9 @@ export class AppletViewOutputArea extends AccordionPanel {
358
358
  // clear applets
359
359
  this._applets = [];
360
360
  if (this.layout) {
361
- this.layout.widgets.forEach((widget) => { var _a; return (_a = this.layout) === null || _a === void 0 ? void 0 : _a.removeWidget(widget); });
361
+ // we need a copy, as forEach does not work, if an item is removed
362
+ const widgetCopy = [...this.layout.widgets];
363
+ widgetCopy.forEach((widget) => { var _a; return (_a = this.layout) === null || _a === void 0 ? void 0 : _a.removeWidget(widget); });
362
364
  }
363
365
  if (applets.length === 0) {
364
366
  // we need a minimum of 1 applet!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fails-components/jupyter-applet-view",
3
- "version": "0.0.1-alpha.12",
3
+ "version": "0.0.1-alpha.18",
4
4
  "description": "A collection of extensions, that let's you select cell and switch to an applet mode, where only the selected cells are visible. This is used for fails-components to have jupyter applets in interactive teaching. ",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -58,8 +58,8 @@
58
58
  "watch:labextension": "jupyter labextension watch ."
59
59
  },
60
60
  "dependencies": {
61
- "@fails-components/jupyter-interceptor": "^0.0.1-alpha.12",
62
- "@fails-components/jupyter-launcher": "^0.0.1-alpha.12",
61
+ "@fails-components/jupyter-interceptor": "^0.0.1-alpha.18",
62
+ "@fails-components/jupyter-launcher": "^0.0.1-alpha.18",
63
63
  "@jupyter-notebook/application": "^7.2.0",
64
64
  "@jupyter-widgets/jupyterlab-manager": "^5.0.13",
65
65
  "@jupyterlab/application": "^4.3.4",
@@ -409,9 +409,9 @@ export class AppletViewOutputArea extends AccordionPanel {
409
409
  // clear applets
410
410
  this._applets = [];
411
411
  if (this.layout) {
412
- (this.layout as PanelLayout).widgets.forEach((widget: Widget) =>
413
- this.layout?.removeWidget(widget)
414
- );
412
+ // we need a copy, as forEach does not work, if an item is removed
413
+ const widgetCopy = [...(this.layout as PanelLayout).widgets];
414
+ widgetCopy.forEach((widget: Widget) => this.layout?.removeWidget(widget));
415
415
  }
416
416
 
417
417
  if (applets.length === 0) {