ソースを参照

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);
     });
   }