From 145ed488dbbdb8bdd2f47e44385bca03b4c57946 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Thu, 23 Mar 2023 07:54:39 -0400 Subject: [PATCH] make the feature committed in dd4d9aa enabled only if JAMBONES_GATHER_CLEAR_GLOBAL_HINTS_ON_EMPTY_HINTS is set, as it is a behavior change --- lib/tasks/gather.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 02cdecdd..9fc6b529 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -70,7 +70,8 @@ class TaskGather extends Task { if (this.asrTimeout > 0) this.asrDtmfTerminationDigit = recognizer.asrDtmfTerminationDigit; this.isContinuousAsr = this.asrTimeout > 0; - if (Array.isArray(this.data.recognizer.hints) && 0 == this.data.recognizer.hints.length) { + if (Array.isArray(this.data.recognizer.hints) && + 0 == this.data.recognizer.hints.length && process.env.JAMBONES_GATHER_CLEAR_GLOBAL_HINTS_ON_EMPTY_HINTS) { logger.debug('Gather: an empty hints array was supplied, so we will mask global hints'); this.maskGlobalSttHints = true; }