Skip to content

Commit

Permalink
Ensure that dialogueActParam is null if there is no dialogue act
Browse files Browse the repository at this point in the history
Should be fixed in ThingTalk but it is not.
  • Loading branch information
gcampax committed Nov 23, 2021
1 parent 7cf22b4 commit 187c449
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/thingtalk/state-manipulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { adjustDefaultParameters } from './ast-utils';
* from the current state.
*/
export function makeSimpleState(state : Ast.DialogueState|null, policyName : string, dialogueAct : string, dialogueActParam : Array<string|Ast.Value>|null = null) {
const newState = new Ast.DialogueState(null, policyName, dialogueAct, dialogueActParam, []);
const newState = new Ast.DialogueState(null, policyName, dialogueAct, dialogueActParam && dialogueActParam.length ? dialogueActParam : null /* FIXME */, []);
if (state === null)
return newState;

Expand Down

0 comments on commit 187c449

Please sign in to comment.