diff --git a/frontend/src/_helpers/utils.js b/frontend/src/_helpers/utils.js index 07f0b6dccb..7373260691 100644 --- a/frontend/src/_helpers/utils.js +++ b/frontend/src/_helpers/utils.js @@ -242,18 +242,20 @@ export function resolveReferences( } else { const dynamicVariables = getDynamicVariables(object); - for (const dynamicVariable of dynamicVariables) { - const value = resolveString( - dynamicVariable, - state, - customObjects, - reservedKeyword, - withError, - forPreviewBox - ); + if (dynamicVariables) { + for (const dynamicVariable of dynamicVariables) { + const value = resolveString( + dynamicVariable, + state, + customObjects, + reservedKeyword, + withError, + forPreviewBox + ); - if (typeof value !== 'function') { - object = object.replace(dynamicVariable, value); + if (typeof value !== 'function') { + object = object.replace(dynamicVariable, value); + } } } }