Explorar o código

Fix update of dirty count

Steven Silvester %!s(int64=7) %!d(string=hai) anos
pai
achega
53780b2475
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  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);
     });
   }