Merge pull request #163 from w3nder/develop

Fix: Variables null
This commit is contained in:
Davidson Gomes
2023-10-05 15:59:39 -03:00
committed by GitHub

View File

@@ -114,9 +114,11 @@ export class TypebotService {
instanceName: instance.instanceName,
};
variables.forEach((variable) => {
prefilledVariables[variable.name] = variable.value;
});
if (variables?.length) {
variables.forEach((variable: { name: string | number; value: string }) => {
prefilledVariables[variable.name] = variable.value;
});
}
if (startSession) {
const response = await this.createNewSession(instance, {