Fix bug in templateFormatter variable evaluation

This commit is contained in:
Dragory 2019-06-22 18:49:45 +03:00
parent 5a91d36953
commit f5a9ac6508

View file

@ -218,7 +218,7 @@ export function parseTemplate(str: string): ParsedTemplate {
}
async function evaluateTemplateVariable(theVar: ITemplateVar, values) {
const value = has(values, theVar.identifier) ? get(values, theVar.identifier)[0] : undefined;
const value = has(values, theVar.identifier) ? get(values, theVar.identifier) : undefined;
if (typeof value === "function") {
const args = [];