From a721619a0605e5585c1bfd96270028e913c50e24 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 15 Nov 2021 12:25:30 +0000 Subject: [PATCH] Update literal helper to return an empty string rather than the string 'undefined' when the value is undefined --- packages/string-templates/src/helpers/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/string-templates/src/helpers/index.js b/packages/string-templates/src/helpers/index.js index b43fef44dc..6b9195047e 100644 --- a/packages/string-templates/src/helpers/index.js +++ b/packages/string-templates/src/helpers/index.js @@ -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}}}`