mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +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 =
|
const formattedValue =
|
||||||
Array.isArray(variableValue) || (typeof variableValue === 'object' && variableValue !== null)
|
Array.isArray(variableValue) || (typeof variableValue === 'object' && variableValue !== null)
|
||||||
? JSON.stringify(variableValue)
|
? JSON.stringify(variableValue)
|
||||||
: String(variableValue)
|
: variableValue
|
||||||
resolvedValue = resolvedValue.replace(match, formattedValue)
|
// 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
|
// Skip fallback logic
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user