fix(scaffolder-backend): remove unused abort
Signed-off-by: mtt-artis <mtt-artis@gmail.com>
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Simplify abort handling in debug:wait action
|
||||
Remove unused abort controller in debug:wait action
|
||||
|
||||
@@ -84,13 +84,14 @@ export function createWaitAction(options?: {
|
||||
);
|
||||
}
|
||||
|
||||
await new Promise(resolve => {
|
||||
await new Promise<void>(resolve => {
|
||||
const timeoutHandle = setTimeout(abort, delayTime.toMillis());
|
||||
ctx.signal?.addEventListener('abort', abort, { once: true });
|
||||
ctx.signal?.addEventListener('abort', abort);
|
||||
|
||||
function abort() {
|
||||
ctx.signal?.removeEventListener('abort', abort);
|
||||
clearTimeout(timeoutHandle);
|
||||
resolve('finished');
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user