Selaa lähdekoodia

Fix update of dirty count

Steven Silvester 7 vuotta sitten
vanhempi
commit
53780b2475
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  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);
     });
   }