From a5b5b102fd1f309605f75541777fe07b796b927b Mon Sep 17 00:00:00 2001 From: Maurits Lourens Date: Tue, 21 Sep 2021 09:57:14 +0200 Subject: [PATCH] replace all handlebars bindings, not just the first --- packages/builder/src/builderStore/dataBinding.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 903512d0fb..d3af6799f3 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -443,7 +443,10 @@ function bindingReplacement(bindableProperties, textWithBindings, convertTo) { for (let from of convertFromProps) { if (shouldReplaceBinding(newBoundValue, from, convertTo)) { const binding = bindableProperties.find(el => el[convertFrom] === from) - newBoundValue = newBoundValue.replace(from, binding[convertTo]) + newBoundValue = newBoundValue.replace( + new RegExp(from, "gi"), + binding[convertTo] + ) } } result = result.replace(boundValue, newBoundValue)