mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 12:48:30 +00:00
fix: extract modules
This commit is contained in:
@@ -73,10 +73,6 @@ export const appModule2FlowNode = ({
|
||||
const template =
|
||||
ModuleTemplatesFlat.find((template) => template.flowType === item.flowType) || EmptyModule;
|
||||
|
||||
const mergeOutputs = item.outputs.concat(
|
||||
template.outputs.filter((output) => !item.outputs.find((item) => item.key === output.key))
|
||||
);
|
||||
|
||||
// replace item data
|
||||
const moduleItem: FlowModuleItemType = {
|
||||
...item,
|
||||
@@ -90,7 +86,7 @@ export const appModule2FlowNode = ({
|
||||
};
|
||||
}),
|
||||
// 合并 template 和数据库,文案以 template 为准
|
||||
outputs: mergeOutputs.map((output) => {
|
||||
outputs: item.outputs.map((output) => {
|
||||
// unChange outputs
|
||||
const templateOutput = template.outputs.find((item) => item.key === output.key);
|
||||
|
||||
|
Reference in New Issue
Block a user