(ctx)
| 62 | } |
| 63 | |
| 64 | check(ctx) { |
| 65 | // Check if a task is enabled or disabled |
| 66 | if (this._state === undefined && this._enabledFn) { |
| 67 | const isEnabled = this._enabledFn(ctx); |
| 68 | |
| 69 | if (this._isEnabled !== isEnabled) { |
| 70 | this._isEnabled = isEnabled; |
| 71 | |
| 72 | this.next({ |
| 73 | type: 'ENABLED', |
| 74 | data: isEnabled |
| 75 | }); |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | hasSubtasks() { |
| 81 | return this._subtasks.length > 0; |