Fix: dot notation for nested output variable resolution (#4983)

Addressed issue of casting value to a string
This commit is contained in:
russelj1
2025-07-30 21:26:21 +01:00
committed by GitHub
parent 9b54aa8879
commit 5259bab778
+8 -2
View File
@@ -351,8 +351,14 @@ export const resolveVariables = async (
const formattedValue =
Array.isArray(variableValue) || (typeof variableValue === 'object' && variableValue !== null)
? JSON.stringify(variableValue)
: String(variableValue)
resolvedValue = resolvedValue.replace(match, formattedValue)
: variableValue
// If the resolved value is exactly the match, replace it directly
if (resolvedValue === match) {
resolvedValue = formattedValue
} else {
// Otherwise do a standard stringreplace
resolvedValue = String(resolvedValue).replace(match, String(formattedValue))
}
// Skip fallback logic
continue
}