Skip to content

Commit a348729

Browse files
committed
Merge branch 'develop' of github.com:EvolutionAPI/evolution-api into develop
2 parents e26ae30 + 1f29b77 commit a348729

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/whatsapp/services/typebot.service.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ export class TypebotService {
114114
instanceName: instance.instanceName,
115115
};
116116

117-
variables.forEach((variable) => {
118-
prefilledVariables[variable.name] = variable.value;
119-
});
117+
if (variables?.length) {
118+
variables.forEach((variable: { name: string | number; value: string }) => {
119+
prefilledVariables[variable.name] = variable.value;
120+
});
121+
}
120122

121123
if (startSession) {
122124
const response = await this.createNewSession(instance, {

0 commit comments

Comments
 (0)