We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fddfc7 commit 95701b5Copy full SHA for 95701b5
packages/action-listener-middleware/src/job.ts
@@ -248,9 +248,9 @@ export class Job<T> implements JobHandle {
248
*/
249
async pause<R>(func: Promise<R>): Promise<R> {
250
this.ensureActive()
251
- const result = await func
+ const result = await Promise.race([func, this._cancelPromise])
252
253
- return result
+ return result as R
254
}
255
256
/**
0 commit comments