diff --git a/src/utils/SubscribablePromise.ts b/src/utils/SubscribablePromise.ts index 15f3d4f..8796d55 100644 --- a/src/utils/SubscribablePromise.ts +++ b/src/utils/SubscribablePromise.ts @@ -21,6 +21,12 @@ export class SubscribablePromise { this.observer.complete(result) } }) + .catch((result) => { + if (Promise.resolve(execution as any) === execution) { + this.observer.error(result) + } + }) + } public subscribe(onNext: (next: T) => void) {