Merge #29 into develop_web from feature/20251219_zy
feat(web): Workflow * feature/20251219_zy: (1 commits) feat(web): Workflow Signed-off-by: zhaoying <zhaoying@redbearai.com> Merged-by: zhaoying <zhaoying@redbearai.com> CR-link: https://codeup.aliyun.com/redbearai/python/redbear-mem-open/change/29
This commit is contained in:
@@ -75,7 +75,7 @@ export const useWorkflowGraph = ({
|
|||||||
|
|
||||||
if (nodes.length) {
|
if (nodes.length) {
|
||||||
const nodeList = nodes.map(node => {
|
const nodeList = nodes.map(node => {
|
||||||
const { id, type, name, position, config } = node
|
const { id, type, name, position, config = {} } = node
|
||||||
let nodeLibraryConfig = [...nodeLibrary]
|
let nodeLibraryConfig = [...nodeLibrary]
|
||||||
.flatMap(category => category.nodes)
|
.flatMap(category => category.nodes)
|
||||||
.find(n => n.type === type)
|
.find(n => n.type === type)
|
||||||
@@ -84,7 +84,7 @@ export const useWorkflowGraph = ({
|
|||||||
if (nodeLibraryConfig?.config) {
|
if (nodeLibraryConfig?.config) {
|
||||||
Object.keys(nodeLibraryConfig.config).forEach(key => {
|
Object.keys(nodeLibraryConfig.config).forEach(key => {
|
||||||
if (nodeLibraryConfig.config && nodeLibraryConfig.config[key]) {
|
if (nodeLibraryConfig.config && nodeLibraryConfig.config[key]) {
|
||||||
nodeLibraryConfig.config[key].defaultValue = config[key]
|
nodeLibraryConfig.config[key].defaultValue = config[key] || {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user