mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 09:01:09 +03:00
Fix: dot notation for nested output variable resolution (#4983)
Addressed issue of casting value to a string
This commit is contained in:
@@ -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 string‐replace
|
||||
resolvedValue = String(resolvedValue).replace(match, String(formattedValue))
|
||||
}
|
||||
// Skip fallback logic
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user