diff --git a/lib/utils/action-hook-delay.js b/lib/utils/action-hook-delay.js index de1cb358..839e38f1 100644 --- a/lib/utils/action-hook-delay.js +++ b/lib/utils/action-hook-delay.js @@ -24,10 +24,12 @@ class ActionHookDelayProcessor extends Emitter { this._active = false; const enabled = this.init(opts); - if (enabled && (!this.actions || !Array.isArray(this.actions) || this.actions.length === 0)) { + if (enabled && this.noResponseTimeout && + (!this.actions || !Array.isArray(this.actions) || this.actions.length === 0)) { throw new Error('ActionHookDelayProcessor: no actions specified'); } - else if (enabled && this.actions.some((a) => !a.verb || ![TaskName.Say, TaskName.Play].includes(a.verb))) { + else if (enabled && this.actions && + this.actions.some((a) => !a.verb || ![TaskName.Say, TaskName.Play].includes(a.verb))) { throw new Error(`ActionHookDelayProcessor: invalid actions specified: ${JSON.stringify(this.actions)}`); } }