Browse Source

Fix update of dirty count

Steven Silvester 7 years ago
parent
commit
53780b2475
1 changed files with 1 additions and 2 deletions
  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);
     });
   }