Ver Fonte

Clean up disposal

Steven Silvester há 8 anos atrás
pai
commit
ceee7c3097
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/notebook/notebook/model.ts

+ 1 - 1
src/notebook/notebook/model.ts

@@ -437,7 +437,7 @@ class NotebookModel extends DocumentModel implements INotebookModel {
       // Add the cell in a new context to avoid triggering another
       // cell changed event during the handling of this signal.
       requestAnimationFrame(() => {
-        if (!this._cells.length) {
+        if (!this.isDisposed && !this._cells.length) {
           this._cells.pushBack(this._factory.createCodeCell());
         }
       });