@jupyter/chat 0.19.0-alpha.0 → 0.19.0-alpha.1
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.
|
@@ -29,9 +29,11 @@ export class ActiveCellManager {
|
|
|
29
29
|
* Handle the change of active notebook cell.
|
|
30
30
|
*/
|
|
31
31
|
this._onActiveCellChanged = (_, activeCell) => {
|
|
32
|
-
var _a;
|
|
32
|
+
var _a, _b;
|
|
33
33
|
if (this._activeCell !== activeCell) {
|
|
34
|
-
(_a = this._activeCell) === null || _a === void 0 ? void 0 : _a.
|
|
34
|
+
if (!((_a = this._activeCell) === null || _a === void 0 ? void 0 : _a.disposed)) {
|
|
35
|
+
(_b = this._activeCell) === null || _b === void 0 ? void 0 : _b.model.stateChanged.disconnect(this._cellStateChange);
|
|
36
|
+
}
|
|
35
37
|
this._activeCell = activeCell;
|
|
36
38
|
activeCell === null || activeCell === void 0 ? void 0 : activeCell.ready.then(() => {
|
|
37
39
|
var _a;
|
package/lib/components/index.js
CHANGED
package/package.json
CHANGED
|
@@ -267,7 +267,9 @@ export class ActiveCellManager implements IActiveCellManager {
|
|
|
267
267
|
activeCell: Cell<ICellModel> | null
|
|
268
268
|
): void => {
|
|
269
269
|
if (this._activeCell !== activeCell) {
|
|
270
|
-
this._activeCell?.
|
|
270
|
+
if (!this._activeCell?.disposed) {
|
|
271
|
+
this._activeCell?.model.stateChanged.disconnect(this._cellStateChange);
|
|
272
|
+
}
|
|
271
273
|
this._activeCell = activeCell;
|
|
272
274
|
|
|
273
275
|
activeCell?.ready.then(() => {
|