mirror of https://github.com/FlowiseAI/Flowise.git
add fix for set variable
parent
305a585cf4
commit
99eaa22af5
|
|
@ -46,9 +46,13 @@ class SetVariable_Utilities implements INode {
|
|||
}
|
||||
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const inputRaw = nodeData.inputs?.input
|
||||
let inputRaw = nodeData.inputs?.input
|
||||
const variableName = nodeData.inputs?.variableName as string
|
||||
|
||||
if (Array.isArray(inputRaw) && inputRaw.length === 1) {
|
||||
inputRaw = inputRaw[0]
|
||||
}
|
||||
|
||||
return { output: inputRaw, dynamicVariables: { [variableName]: inputRaw } }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue