mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
evaluateTemplateVariable: require property to be a direct/own property of 'values', not from its prototype
This commit is contained in:
parent
f76dd3ed62
commit
40cb74ee28
3 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
import has from "lodash.has";
|
||||
import at from "lodash.at";
|
||||
|
||||
const TEMPLATE_CACHE_SIZE = 100;
|
||||
|
@ -218,7 +219,7 @@ export function parseTemplate(str: string): ParsedTemplate {
|
|||
}
|
||||
|
||||
async function evaluateTemplateVariable(theVar: ITemplateVar, values) {
|
||||
const value = at(values, theVar.identifier)[0];
|
||||
const value = has(values, theVar.identifier) && at(values, theVar.identifier)[0];
|
||||
|
||||
if (typeof value === "function") {
|
||||
const args = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue