some mutating function parameter
This commit is contained in:
parent
f975237417
commit
fe8c870050
|
@ -4,6 +4,7 @@ export function readableToRuntimeBinding(bindableProperties, textWithBindings) {
|
||||||
// Find all instances of mustasche
|
// Find all instances of mustasche
|
||||||
const boundValues = textWithBindings.match(CAPTURE_VAR_INSIDE_MUSTACHE)
|
const boundValues = textWithBindings.match(CAPTURE_VAR_INSIDE_MUSTACHE)
|
||||||
|
|
||||||
|
let result = textWithBindings
|
||||||
// Replace readableBindings with runtimeBindings
|
// Replace readableBindings with runtimeBindings
|
||||||
boundValues &&
|
boundValues &&
|
||||||
boundValues.forEach(boundValue => {
|
boundValues.forEach(boundValue => {
|
||||||
|
@ -11,13 +12,13 @@ export function readableToRuntimeBinding(bindableProperties, textWithBindings) {
|
||||||
return boundValue === `{{ ${readableBinding} }}`
|
return boundValue === `{{ ${readableBinding} }}`
|
||||||
})
|
})
|
||||||
if (binding) {
|
if (binding) {
|
||||||
textWithBindings = textWithBindings.replace(
|
result = textWithBindings.replace(
|
||||||
boundValue,
|
boundValue,
|
||||||
`{{ ${binding.runtimeBinding} }}`
|
`{{ ${binding.runtimeBinding} }}`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return textWithBindings
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
export function runtimeToReadableBinding(bindableProperties, textWithBindings) {
|
export function runtimeToReadableBinding(bindableProperties, textWithBindings) {
|
||||||
|
|
Loading…
Reference in New Issue