atom.io 0.9.5 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -342,7 +342,7 @@ type Fated<T, E extends Error = Error> = Loadable<E | T>;
342
342
  * Can be constructed like a Promise, or from an existing Promise.
343
343
  */
344
344
  declare class Future<T> extends Promise<T> {
345
- private isCanceled;
345
+ isCanceled: boolean;
346
346
  constructor(executor: Promise<T> | ((resolve: (value: T) => void, reject: (reason?: any) => void) => void));
347
347
  cancel(): void;
348
348
  }
@@ -342,7 +342,7 @@ type Fated<T, E extends Error = Error> = Loadable<E | T>;
342
342
  * Can be constructed like a Promise, or from an existing Promise.
343
343
  */
344
344
  declare class Future<T> extends Promise<T> {
345
- private isCanceled;
345
+ isCanceled: boolean;
346
346
  constructor(executor: Promise<T> | ((resolve: (value: T) => void, reject: (reason?: any) => void) => void));
347
347
  cancel(): void;
348
348
  }
@@ -910,6 +910,9 @@ var cacheValue = (key, value, subject, store = IMPLICIT.STORE) => {
910
910
  const future = new Future(value);
911
911
  target(store).valueMap.set(key, future);
912
912
  future.then((value2) => {
913
+ if (future.isCanceled) {
914
+ return;
915
+ }
913
916
  cacheValue(key, value2, subject, store);
914
917
  subject.next({ newValue: value2, oldValue: value2 });
915
918
  }).catch((error) => {