add defaul value for gather config

This commit is contained in:
akirilyuk committed 2022-02-01 15:24:29 +01:00
1 parent 95188f59ec
commit 8a641f1d9a
1 file changed
+1 -1
+1 -1
View File
@@ -24,7 +24,7 @@ class SpeechConfig extends Emitter {
this.logger.debug({opts, sessionLevel: this.sessionConfig, turnLevel: this.turnConfig}, 'SpeechConfig updated');
}
makeGatherTaskConfig({textPrompt, urlPrompt}) {
makeGatherTaskConfig({textPrompt, urlPrompt} = {}) {
const opts = JSON.parse(JSON.stringify(this.sessionConfig || {}));
const nextTurnKeys = Object.keys(this.turnConfig || {});
const newKeys = nextTurnKeys.filter((k) => !(k in opts));