diff --git a/packages/core/utils/src/json-templates.ts b/packages/core/utils/src/json-templates.ts index 0315462df..00de502ea 100644 --- a/packages/core/utils/src/json-templates.ts +++ b/packages/core/utils/src/json-templates.ts @@ -92,15 +92,20 @@ const parseString = (() => { return matches.reduce((result, match, i) => { const parameter = parameters[i]; let value = objectPath.get(context, parameter.key); - if (value == null) { + const type = typeof value; + + if (type === 'undefined') { + if (typeof parameter.defaultValue === 'undefined') { + return value; + } value = parameter.defaultValue; } - if (typeof value === 'function') { + if (type === 'function') { value = value(); } - if (typeof value === 'object') { + if (type === 'object') { return value; }