3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

templateFormatter: fix unknown values showing up as "false"

This commit is contained in:
Miikka 2019-04-17 09:43:27 +03:00 committed by GitHub
parent 24e16078ec
commit 74cce3d093
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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