Update literal helper to return an empty string rather than the string 'undefined' when the value is undefined
This commit is contained in:
parent
3470b1ea1b
commit
a721619a06
|
@ -46,6 +46,9 @@ const HELPERS = [
|
|||
}),
|
||||
// adds a note for post-processor
|
||||
new Helper(HelperFunctionNames.LITERAL, value => {
|
||||
if (value === undefined) {
|
||||
return ""
|
||||
}
|
||||
const type = typeof value
|
||||
const outputVal = type === "object" ? JSON.stringify(value) : value
|
||||
return `{{${LITERAL_MARKER} ${type}-${outputVal}}}`
|
||||
|
|
Loading…
Reference in New Issue