workflow: drop the dead abandon-timer guard in drive()'s finally

The per-file branch gate caught it: drive()'s finally always cancels
first, and every first cancel() arms the abandon timer, so the
`!== undefined` guard's false arm was unreachable. clearTimeout
tolerates undefined by contract — call it unguarded.
This commit is contained in:
Tianyi Cui
2026-07-06 01:53:44 +08:00
parent 706691a7df
commit 80250a8f2e

View File

@@ -265,8 +265,9 @@ export class WorkflowExecution {
// their rejections from going unhandled.) // their rejections from going unhandled.)
if (this.cancelReason === undefined) this.cancel('workflow settled') if (this.cancelReason === undefined) this.cancel('workflow settled')
// drive() settling means nothing is left to abandon — including the // drive() settling means nothing is left to abandon — including the
// timer the self-cancel above just armed. // timer the self-cancel above just armed (cancel() always arms it, so
if (this.abandonTimer !== undefined) clearTimeout(this.abandonTimer) // it is never undefined here; clearTimeout tolerates undefined anyway).
clearTimeout(this.abandonTimer)
} }
} }