add new check for overrideconfig to fix bug where external prediction call reset flow
This commit is contained in:
parent
24ceeb8671
commit
d83b57c349
|
|
@ -378,7 +378,6 @@ export class App {
|
|||
nodeToExecuteData = this.chatflowPool.activeChatflows[chatflowid].endingNodeData
|
||||
} else {
|
||||
/*** Get chatflows and prepare data ***/
|
||||
|
||||
const flowData = chatflow.flowData
|
||||
const parsedFlowData: IReactFlowObject = JSON.parse(flowData)
|
||||
const nodes = parsedFlowData.nodes
|
||||
|
|
|
|||
|
|
@ -398,15 +398,20 @@ export const isSameOverrideConfig = (
|
|||
existingOverrideConfig?: ICommonObject,
|
||||
newOverrideConfig?: ICommonObject
|
||||
): boolean => {
|
||||
// Skip check if its internal call
|
||||
if (isInternal) return true
|
||||
// If existing and new overrideconfig are the same
|
||||
if (
|
||||
existingOverrideConfig &&
|
||||
Object.keys(existingOverrideConfig).length &&
|
||||
newOverrideConfig &&
|
||||
Object.keys(newOverrideConfig).length &&
|
||||
JSON.stringify(existingOverrideConfig) === JSON.stringify(newOverrideConfig)
|
||||
)
|
||||
) {
|
||||
return true
|
||||
}
|
||||
// If there is no existing and new overrideconfig
|
||||
if (!existingOverrideConfig && !newOverrideConfig) return true
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue