File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,7 @@ export default class TaskExecution extends EventEmitter {
8585
8686 const startInstanceResult = await this . _api . startInstance ( processId , elementId , variables ) ;
8787
88- // @ts -ignore (it can actually change to `idle` while awaiting startInstance)
89- if ( this . _status === 'idle' ) {
88+ if ( /** @type {TaskExecutionStatus } */ ( this . _status ) === 'idle' ) {
9089
9190 // Execution was canceled in the meantime
9291 return ;
@@ -138,8 +137,7 @@ export default class TaskExecution extends EventEmitter {
138137 if ( hasIncident ) {
139138 const getProcessInstanceIncidentResult = await this . _api . getProcessInstanceIncident ( processInstanceKey ) ;
140139
141- // @ts -ignore
142- if ( this . _status === 'idle' ) {
140+ if ( /** @type {TaskExecutionStatus } */ ( this . _status ) === 'idle' ) {
143141
144142 // Execution was canceled in the meantime
145143 this . cancelTaskExecution ( ) ;
@@ -159,8 +157,7 @@ export default class TaskExecution extends EventEmitter {
159157 if ( isCompleted || hasIncident ) {
160158 const getProcessInstanceVariablesResult = await this . _api . getProcessInstanceVariables ( processInstanceKey ) ;
161159
162- // @ts -ignore
163- if ( this . _status === 'idle' ) {
160+ if ( /** @type {TaskExecutionStatus } */ ( this . _status ) === 'idle' ) {
164161
165162 // Execution was canceled in the meantime
166163 this . cancelTaskExecution ( ) ;
You can’t perform that action at this time.
0 commit comments