瀏覽代碼

Fix update of dirty count

Steven Silvester 7 年之前
父節點
當前提交
53780b2475
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      packages/application/src/index.ts

+ 1 - 2
packages/application/src/index.ts

@@ -141,8 +141,7 @@ class JupyterLab extends Application<ApplicationShell> {
   setDirty(): IDisposable {
     this._dirtyCount++;
     return new DisposableDelegate(() => {
-      this._dirtyCount--;
-      this._dirtyCount = Math.min(0, this._dirtyCount);
+      this._dirtyCount = Math.max(0, this._dirtyCount - 1);
     });
   }