mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 01:18:23 +00:00
Resolve strings with multiple dynamic variables
This commit is contained in:
parent
fdfc9dc195
commit
30847f10e9
1 changed files with 2 additions and 2 deletions
|
|
@ -52,10 +52,10 @@ export function resolveReferences(object, state) {
|
|||
const dynamicVariables = getDynamicVariables(object);
|
||||
if (dynamicVariables) {
|
||||
if (dynamicVariables.length === 1 && dynamicVariables[0] === object) {
|
||||
object = resolve(dynamicVariables[0], state);
|
||||
object = resolveReferences(dynamicVariables[0], state);
|
||||
} else {
|
||||
for (const dynamicVariable of dynamicVariables) {
|
||||
const value = resolve(dynamicVariable, state);
|
||||
const value = resolveReferences(dynamicVariable, state);
|
||||
object = object.replace(dynamicVariable, value);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue