refactor: cast variable types while computing
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
3f2f1212c9
commit
06bfba371d
@@ -16,7 +16,13 @@ const computeAuthStepVariables = (variableSchema: any, aggregatedData: any) => {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
variables[variable.name] = template(variable.value, { interpolate })(aggregatedData);
|
const computedVariable = template(variable.value, { interpolate })(aggregatedData);
|
||||||
|
|
||||||
|
if (variable.type === 'integer') {
|
||||||
|
variables[variable.name] = parseInt(computedVariable, 10);
|
||||||
|
} else {
|
||||||
|
variables[variable.name] = computedVariable;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return variables;
|
return variables;
|
||||||
|
Reference in New Issue
Block a user