mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
Tiny changes to allow for falsy values to be used in templates and variables.
This commit is contained in:
parent
0710f2fc3a
commit
950d0b665f
@ -326,12 +326,12 @@ module.exports = {
|
||||
'Module level templates extend project level templates if there are duplicates. You will need to change: ' + template);
|
||||
}
|
||||
|
||||
if (!templates[template]) {
|
||||
// Replace
|
||||
if (template in templates) {
|
||||
t.update(templates[template]);
|
||||
} else {
|
||||
SCli.log('WARNING: the following template is requested but not defined: ' + template + (data.name ? ' in ' + data.name : ''));
|
||||
}
|
||||
|
||||
// Replace
|
||||
if (templates[template]) t.update(templates[template]);
|
||||
}
|
||||
});
|
||||
|
||||
@ -351,7 +351,7 @@ module.exports = {
|
||||
let variableName = variableSyntax.replace(varTemplateSyntax, (match, varName) => varName.trim());
|
||||
let value;
|
||||
|
||||
if (variablesObject[variableName]) {
|
||||
if (variableName in variablesObject) {
|
||||
value = variablesObject[variableName];
|
||||
}
|
||||
|
||||
@ -449,4 +449,4 @@ module.exports = {
|
||||
return functions;
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user