We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ff9c45 commit 6a3f82eCopy full SHA for 6a3f82e
src/whatsapp/services/typebot.service.ts
@@ -114,9 +114,11 @@ export class TypebotService {
114
instanceName: instance.instanceName,
115
};
116
117
- variables.forEach((variable) => {
118
- prefilledVariables[variable.name] = variable.value;
119
- });
+ if (variables?.length) {
+ variables.forEach((variable: { name: string | number; value: string }) => {
+ prefilledVariables[variable.name] = variable.value;
120
+ });
121
+ }
122
123
if (startSession) {
124
const response = await this.createNewSession(instance, {
0 commit comments