From 591cb6266d3c07680845b863f7909e1eb593b30f Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Mon, 29 Nov 2021 22:20:05 +0300 Subject: [PATCH] fix RuntimeTemplate --- lib/RuntimeTemplate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/RuntimeTemplate.js b/lib/RuntimeTemplate.js index 08b9e636d65..feb9b3e505c 100644 --- a/lib/RuntimeTemplate.js +++ b/lib/RuntimeTemplate.js @@ -200,7 +200,7 @@ class RuntimeTemplate { // when the first two args are expression, we need to prepend "" + to force string // concatenation instead of number addition. - return typeof args[0] !== "string" && args[1] !== "string" + return typeof args[0] !== "string" && typeof args[1] !== "string" ? `"" + ${str}` : str; }