소스 검색

Clean up disposal

Steven Silvester 8 년 전
부모
커밋
ceee7c3097
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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());
         }
       });